Install cross-compilation tools as described here.
On Debian PC, install Qt 4 dev tools:
sudo apt-get install qt4-dev-tools gdb-multiarch
Install and build Qt source v4.8 and build it for the BeagleBone:
As user (not root):
Download latest 4.x version of source:
http://download.qt.io/official_releases/qt/4.8/
I used:
wget http://download.qt.io/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz
Untar it:
tar -xzf qt-everywhere-opensource-src-4.8.6.tar.gz
Rename the folder to something more convenient:
mv qt-everywhere-opensource-src-4.8.6 qt-4.8.6-beagle
Go to the folder:
cd qt-4.8.6-beagle
Copy the folder:
cp -r mkspecs/linux-arm-gnueabi-g++/ mkspecs/linux-arm-gnueabihf-g++/
Edit the qmake.conf file:
nano mkspecs/linux-arm-gnueabihf-g++/qmake.conf
Change all references of “arm-linux-gnueabi” to “arm-linux-gnueabihf” (add the “hf”)
For instance, arm-linux-gnueabi-gcc becomes arm-linux-gnueabihf-gcc.
Save the file and exit.
In the root of the new qt directory, create a config script file:
nano config
Add the line:
./configure -v -opensource -confirm-license -xplatform linux-arm-gnueabihf-g++ -embedded arm -little-endian -host-little-endian -prefix /usr/local/qt4.8.6-armhf
Save and exit.
Make it executable:
chmod 700 config
Configure, build, and install:
./config make sudo make install
If you need to re-run config, perhaps to change some options:
make confclean make clean ./config make sudo make install
Install Qt Creator:
Still as user (not root), download the latest version. When this was written, it was:
cd wget http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-linux-x64-5.4.1.run
Make it executable:
chmod 700 qt-opensource-linux-x64-5.4.1.run
Run it.
./qt-opensource-linux-x64-5.4.1.run
On the target BeagleBone, install Debian via the eMMC flasher image:
BBB-eMMC-flasher-debian-7.5-2014-05-14-2gb.img
Then, install basic compilers and Qt4 on the BeagleBone:
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install qt4-dev-tools
Create a destination directory on the BeagleBone for the Qt libraries:
sudo mkdir /usr/local/qt4.8.6-armhf
Copy from the PC to the BeagleBone:
On PC (Debian VM):
scp -r /usr/local/qt4.8.6-armhf/* root@beaglebone:/usr/local/qt4.8.6-armhf
When creating new Qt projects, modify PROJECT.pro to look like:
TARGET = ProjectName target.files = ProjectName target.path = /home/debian/sandbox/ProjectName TEMPLATE = app INSTALLS += target