world leader in high performance signal processing
Trace: » qt

QT Embedded

Qt is a cross-platform application framework created and maintained by Trolltech. Using Qt, you can develop applications and user interfaces once, and deploy them across many desktop and embedded operating systems without rewriting the source code. Visit the QT homepage at for more information.

QT provides different licensing methods depending on your needs. For people whose project is open source, they can use the free version. For people whose project is closed source, a commercial version is available for you to license. See the QT licensing page for all the gory details at

The QT documentation can be found at, and every QT source tree includes full documentation as well. Simply browse to the doc/html/ sub directory in the QT distribution. The summary page for embedded Linux is pretty useful as well

This documentation covers QT as integrated into the uClinux distribution. If you're using an older release, please view Old revisions of this page (see the button in the upper left).


To build QT, just enable it in your user/vendor settings. Depending on what you want to do, the major build options are controlled as sub-QT options.

WebKit is for web browsers (HTML rendering). The QT Virtual Framebuffer is for development when you don't have a real framebuffer to work with, and VNC/ethernet is not an option. If you're interested in testing things or developing your own code, then the demos/examples may be useful to you.

Library Configuration  --->
  [*] Build QT
  [ ]   Build WebKit
  [ ]   Build QT Virtual Framebuffer
  [ ]   Build demos/examples


If QT is too big for your needs, you can customize the options that are enabled even further via the qconfig.h header. Support for this header is integrated automatically by putting it into your board's directory: uClinux-dist/vendors/<vendor>/<board>/qconfig-uc.h.

For more information, visit the page.



If you do not have a QT server running already, then just launch your QT app with the -qws flag to automatically create one for your application.

root:~> some-qt-app -qws

See the page for more information.


Usually if you want to launch a QT app in a VNC session and then connect to it from your desktop, you can use the flag -display VNC:0.

root:~> some-qt-app -qws -display VNC:0

See the page for more information.



You should consult the tslib documentation first for setting up the proper touchscreen environment.

Then just do:

root:~> export QWS_MOUSE_PROTO=tslib


root:~> export QWS_MOUSE_PROTO=Auto:/dev/input/mice


For serial mouse on UART0. Make sure there is no console running on the UART you have the mouse hooked up to. Consult the setup serial mouse page for more details.

root:~> stty -F /dev/ttyBF0 ispeed 1200 cs7 -icanon
root:~> export QWS_MOUSE_PROTO=Microsoft:/dev/ttyBF0

QT 4.7

For some new version of QT, we should do following to enable mouse and keyboard:

root:~> export QWS_KEYBOARD=USB:/dev/input/event0
root:~> export QWS_MOUSE_PROTO=USB:/dev/input/event0

QT plugin

While QT is compiled in FDPIC format, dynamic plugins can be used without any problem. But in FLAT format, we can only use static plugins.

The way to use static plugins are importing them in the applications and adding corresponding options in the .pro file of the project. For example, to let pictureflow support jpeg using qjpeg plugin, we need give the following patch:

Index: pictureflow-0.1.0/pictureflow-qt/
--- pictureflow-0.1.0/pictureflow-qt/    (revision 9290)
+++ pictureflow-0.1.0/pictureflow-qt/    (working copy)
@@ -1,7 +1,9 @@
 TARGET = pictureflow
 TEMPLATE = app 
 linux-bfin-flat-* {
-       QMAKE_LIBS_THREAD += -lz -lpng
+       QMAKE_LIBS_THREAD += -lz -lpng -lqjpeg -ljpeg
+       QTPLUGIN += qjpeg
+       CONFIG += static 
 HEADERS = pictureflow.h
 SOURCES = pictureflow.cpp main.cpp
Index: pictureflow-0.1.0/pictureflow-qt/main.cpp
--- pictureflow-0.1.0/pictureflow-qt/main.cpp   (revision 9290)
+++ pictureflow-0.1.0/pictureflow-qt/main.cpp   (working copy)
@@ -30,6 +30,12 @@
 #include <qfileinfo.h>
 #include <qimage.h>
+#include <qplugin.h>
 #if QT_VERSION >= 0x040000
 #include <QTime>

QT Demos

The demos/examples are all installed into the staging directory uclinux-dist/staging/usr/qt/demos/ and uclinux-dist/staging/usr/qt/examples/. Since they tend to be quite large (~15 megs), they are not installed automatically for you into the romfs directory (and thus the kernel image). Copy over any demos/examples you wish to play with and execute them manually. For simple apps, this may be just the binary.

For example, to run the gradients demo, first copy it to the board with rcp (you'll have to change the IP obviously):

$ rcp staging/usr/qt/demos/gradients/gradients root@

Then just run it on the board:

root:~> gradients -qws



Here is a short video which includes some Qt examples:

The Adobe Flash Plugin is needed to display this content.


PictureFlow compiled for the Blackfin:

root:~> cd /media/picts/
root:/media/picts> pictureflow -qws
Creating mouse: Auto