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

783 views
Skip to first unread message

dlewin555

unread,
Apr 8, 2014, 11:26:34 AM4/8/14
to beagl...@googlegroups.com
Hi,

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 ...

halh...@gmail.com

unread,
Apr 8, 2014, 3:59:24 PM4/8/14
to beagl...@googlegroups.com
dlewin,

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

David Lewin

unread,
Apr 8, 2014, 5:16:00 PM4/8/14
to beagl...@googlegroups.com
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 ?


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/p9423s6B4lg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Nelson

unread,
Apr 8, 2014, 5:18:42 PM4/8/14
to Beagle Board
On Tue, Apr 8, 2014 at 4:16 PM, David Lewin <dlew...@gmail.com> wrote:
> 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..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

David Lewin

unread,
Apr 8, 2014, 6:12:46 PM4/8/14
to beagl...@googlegroups.com
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.


Hussam Hertani

unread,
Apr 8, 2014, 7:14:39 PM4/8/14
to beagl...@googlegroups.com
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.  

Don deJuan

unread,
Apr 8, 2014, 8:05:01 PM4/8/14
to beagl...@googlegroups.com
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

use distcc to help speed up on hardware compilation.

Hussam Hertani

unread,
Apr 8, 2014, 8:12:00 PM4/8/14
to beagl...@googlegroups.com
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

John Syn

unread,
Apr 9, 2014, 3:23:41 AM4/9/14
to beagl...@googlegroups.com

From: dlewin555 <dlew...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Tuesday, April 8, 2014 at 8:26 AM
To: <beagl...@googlegroups.com>
Subject: [beagleboard] Finally : did someone succeeded to have a Qt GUI app ?
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. 

Regards,
John

David Lewin

unread,
Apr 9, 2014, 2:04:14 PM4/9/14
to beagl...@googlegroups.com
@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


2014-04-08 21:59 GMT+02:00 <halh...@gmail.com>:

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/p9423s6B4lg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

halh...@gmail.com

unread,
Apr 10, 2014, 9:21:20 AM4/10/14
to beagl...@googlegroups.com

David,
 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.

Hussam


On Tuesday, April 8, 2014 11:26:34 AM UTC-4, dlewin555 wrote:

David Lewin

unread,
Apr 10, 2014, 11:52:58 AM4/10/14
to beagl...@googlegroups.com
Hussam,
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".





--

Hussam Hertani

unread,
Apr 10, 2014, 12:00:55 PM4/10/14
to beagl...@googlegroups.com
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 deb...@192.168.0.102
  • 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 http://beagleboard.org/latest-images 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) http://elinux.org/BeagleBoardDebian on my BBB.


Hussam




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

David Lewin

unread,
Apr 10, 2014, 12:29:25 PM4/10/14
to beagl...@googlegroups.com
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:

beagleboard.org_image.sh http://beagleboard.org/source

to use the setup_sdcard.sh as explained.

Maybe this is the problem root cause 

Hussam Hertani

unread,
Apr 10, 2014, 4:56:41 PM4/10/14
to beagl...@googlegroups.com
David,
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..http://elinux.org/BeagleBoardDebian. 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 http://beagleboard.org/latest-images. It comes with LXDE which is a very good desktop environment for the BBB..... and........NodeJs......yuck!

Hussam Hertani

unread,
Apr 10, 2014, 7:20:40 PM4/10/14
to beagl...@googlegroups.com
David, here's a pic of the same app running in LXDE based on the
latest official Debian image that I downloaded from:
http://beagleboard.org/latest-images

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

Hussam
>>> - I SSHed into the BBB with X11 Forwarding: ssh -X
>>> deb...@192.168.0.102
>>> - Made a directory containing a sample application
>>> - built it using "qmake -project", "qmake" & "make"
>>> - and ran the binary successfully!
2014-04-10-231141_1280x720_scrot.png

David Lewin

unread,
Apr 11, 2014, 10:46:03 AM4/11/14
to beagl...@googlegroups.com
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....

David Lewin

unread,
Apr 11, 2014, 11:13:46 AM4/11/14
to beagl...@googlegroups.com
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  

Cody Lacey

unread,
Apr 11, 2014, 11:57:58 AM4/11/14
to beagl...@googlegroups.com
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


You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

David Lewin

unread,
Apr 11, 2014, 12:23:04 PM4/11/14
to beagl...@googlegroups.com
Cody : that's it.

Thank you very much for that.

David Lewin

unread,
Apr 11, 2014, 12:37:40 PM4/11/14
to beagl...@googlegroups.com
just a side question  : I just need to have my Qt GUI app to be shown, without lxde: what do I need to do  ?

Micka

unread,
Apr 11, 2014, 12:42:11 PM4/11/14
to beagl...@googlegroups.com

I use xinit, it's light enough.

But if someone can compile qt4.8 for us with the extension qws and the touchscreen, it would be awesome......

Micka,

David Lewin

unread,
Apr 11, 2014, 1:13:23 PM4/11/14
to beagl...@googlegroups.com
Micka I did this,as qws is enabled in configure by default, but it didn't seems to be taken in account

Micka

unread,
Apr 11, 2014, 3:22:39 PM4/11/14
to beagl...@googlegroups.com
Well, did someone manage to make it work ?

It would be cool to share with us :) .

g shirisha

unread,
Sep 22, 2014, 2:21:06 AM9/22/14
to beagl...@googlegroups.com, dlew...@gmail.com


hi ,
    Am using debian , but unable to open qt gui on beagle board .
At first i used angstrom image, then it worked well, i would like to work with same angstrom toolschain with debian beagle board . help me ,,thanks in advance

Moscowbob

unread,
Sep 22, 2014, 8:13:55 AM9/22/14
to beagl...@googlegroups.com, dlew...@gmail.com
Use this guide

I used this rootfs

I used this kernel

Setup NFS and TFTP boot, instead of copying to sd card as described in eewiki, copy to nfs and tftp directories.

Download and extract QT source

Download helper scripts

Boot BBB (NFS+TFTP)
Install sgx as exaplained in eewiki and reboot - test chameleonman

sudo apt-get update && sudo apt-get upgrade
install all dev packages as required by QT

create mkspec and device files as explained here and also make sure you created a build directory for shadow building qt

At this point everything should be updated and ready on the BBB.

On the build machine do the following:

export the the following, making sure to adjust the paths for you own environment

export QMAKESPEC=
export PATH=/usr/local/linaro-4.8/bin:/home/rob/beaglebone/qt-5.3.2-host/qtbase/bin:$PATH
export PKG_CONFIG_PATH=/home/rob/beaglebone/rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig
export PKG_CONFIG_LIBDIR=/home/rob/beaglebone/rootfs/usr/lib/pkgconfig:/home/rob/beaglebone/rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=/home/rob/beaglebone/rootfs
 
cd to your qt build dir ( in my case qt-5.3.2-host)

../qt-everywhere-opensource-src-5.3.2/configure -prefix /usr/local/qt5 -release -device linux-beaglebone-g++ \
-make libs -device-option CROSS_COMPILE=/usr/local/linaro-4.8/bin/arm-linux-gnueabihf- \
-device-option DISTRO=jessie -sysroot /home/rob/beaglebone/rootfs -opensource \
-confirm-license -no-pch -no-xcb -no-gtkstyle -opengl es2 -eglfs -v -make examples -nomake tests

this should configure qt and be ready for build
make
sudo make install.

There are a few small problems :
1. On my Circuitco LCD4, the resistive touchscreen is a bit jittery.
2. EGLFS does not allow multiple windows so certain opengl and qtquick examples do not work (should be available in qt 5.4)
3. I have not been able to play back video since gstreamer0.10 does not have the ffmpeg package, although it is available in gstreamer1.0, qt is not able to use it.
4. I have not yet built webkit.

I hope this might help somebody because as a noob myself , I could not find clear instructions for this.

Regards
Rob
Reply all
Reply to author
Forward
0 new messages