Finally : did someone succeeded to have a Qt GUI app ?


Is there finally someone who succeeded to have a GUI compiled with Qt (from Debian for example ) ?

I’ve tested many things, and they either rely on Angstrom (which I’d like to avoid) or don’t work at all (Timesys included)

So I’m looking for a successful try …


Assuming you have LXDE & X installed under Debian you can install qt4 with apt-get: “sudo apt-get install libqt4-dev”. For a more comprehensive QT4 install including qtCreator (natively on the BBB) try “sudo apt-get install qt-sdk”. To build a QT app from the command line, create a directory…add source code for your project in that directory, cd into the directory then run:
i) “qmake -project” (create .pro file),
ii) “qmake” (create makefile) and finally
iii) “make” ("build qt app)

You can also try Qtcreator natively on the RPi…it may be a little laggy though

Thanks for your answer Hal.
I succeeded to build apps on my PC but the failing part is when cross-compiling from PC and executing it to BBB.
Does this mean that a Qt application can only be developped from the board , instead of QtCreator on PC as usual ?

Debian is using the "armhf" abi, so make sure your cross compiler is
of the "gnueabihf" variety..


Indeed, as I’ve already got the case now I pay attention to that point: the gnueabihf from Linaro were used as in the Louis good tutorial :

Anyway, whereas the cross-compilation was ok-the app execute fine- the display can’t show GUI correctly (no btn, no label, …) it seems that
everybody has that issue. I’ve looked in the forums (official Qt about BBB included) for an alternative of linufb (xcb as instance) without better results.
Therefore, I wonder if Qt is able to be cross-compiled for BBB.

David, yes absolutely You can build applications natively on the BBB using a native compiler (ygcc compiler on the BBB not a cross compiler…) and a native set of the QT4 libraries. Expect slightly slower build times though. Also running QtCreator natively on the BBB might be a bit laggy…but usable. I typically build the applications from the command line. This approach uses a pre-built armhf version of QT4 from the debian repos. It is not as flexible as a custom QT library build and requires Xorg/server but it works.

use distcc to help speed up on hardware compilation.

David you can definitely cross-compile QT apps for the BBB as well…I just found the process

to be somewhat unwieldy. Getting native compilation to work is much easier and achieves more or less the same thing …most of the time


Is there finally someone who succeeded to have a GUI compiled with Qt (from Debian for example ) ?

I’ve tested many things, and they either rely on Angstrom (which I’d like to avoid) or don’t work at all (Timesys included)

So I’m looking for a successful try …

If you search google groups for “QT5.1.1 running on BeagleBoneBlack”, you will see I explained how to make this work back on Dec 15. Some of the instructions are now obsolete because Robert Nelson applied these patches to his kernel and also added SGX scripts, but the configuration and building of QT will still be the same. I did this on V3.12, but I believe this should now work on V3.8.


@Halherta : ater installed the sdk, I’ve tried this local solution, (ie : qmake+make on the BBB)
thus executing the app lead me to :

No protocol specified

testapp: cannot connect to X server :0.0

Either I start or stop the lightdm, or did a

export DISPLAY=:0.0

the local app is unable to execute

Put “export DISPLAY=:0.0” in the /etc/profile, reboot and start X11 i.e lightdm/or LXDE. then try running the qt app binary again. I will retry this again myself and report back.


export DISPLAY in the profile didn’t changed the behaviour.I’ve tried with and without lxds started

What I wonder the most is that the Qt app shouldn’t need the X when starting with “-qws” option, or “-plaform linuxfb”.

David I’m currently running a headless setup on my BBB…I have xorg and libqt4-dev packages installed (qt-sdk package encompasses libqt4-dev, qtcreator and some additional packages)

  • I SSHed into the BBB with X11 Forwarding: ssh -X debian@
  • Made a directory containing a sample application
  • built it using “qmake -project”, “qmake” & “make”
  • and ran the binary successfully!

This seems to work with SSH+X11 forwarding…I will try it with the latest Debian image +LXDE+Nodejs from here and report back.

I’m attaching a compressed folder containing the example code and a pic of the GUI UI as displayed over SSH+X11. I’m running Debian Jessie on my PC and the latest Debian demo-image (headless) on my BBB.


qttest.tar.gz (9.51 KB)

Screenshot from 2014-04-10 11:57:44.png

That a good example.
I’ve tried with the provided executable and build it myself also from the board :
both gave the same results, even with ssh+X
BUT, what I see is that you use a different image as me: I ve used the git repo and did a:

to use the as explained.

Maybe this is the problem root cause


If you are running an image with a Debian root filesystem this should work no problems. I don’t think that the QT4 built in the Debian apt-get armhf repos was built with the -qws and -linuxfb options. As such it should only work with X11. But I could be wrong as I can’t quite confirm it.

I use the demo image available here… I always used it…never really bothered with angstrom even with the older Beaglebone white. This image is headless and somewhat barebones. I also really like the new official Debian release It comes with LXDE which is a very good desktop environment for the BBB… and…NodeJs…yuck!

David, here's a pic of the same app running in LXDE based on the
latest official Debian image that I downloaded from:

Make sure that you use a 4GB+ microsd. After burning the image onto
the microsd, make sure you expand the root will need
the space.



From your capture, it seems that you use a “traditional” display, so you are able to use the local lxde terminal.
While I use ssh session (I can’t use the 4" display to type directly in) to connect to the board and run the app there…

Besides, the app is starting well as if I try with

ssh -C -X root:root@192… /home/Qt_app/myApp

the app is shown in the local display

If you are using debian
SSH to your BBB but instead of loging in as root log in as
username: debian (or whatever local username you use)
password: temppwd (or local password)

export DISPLAY=":0"
xhost +

Then try running your application

Cody : that’s it.

Thank you very much for that.