Minimum needed to run a Qt4 program

Hello all,

Does anyone know what the minimum install is needed to get a Qt4 program to run on a BeagleBone Black?

I’m trying to get a kiosk type program running with a 7" touchscreen. I have tried various LCD capes and have narrowed it down to a Newhaven NHD-7.0CTP-CAPE. That screen has a capacitive touch instead of a resistive touch and seems to work a lot better. The capacitive touch doesn’t have the calibration issues I saw with the resistive touch.

Starting with this image:

https://rcn-ee.net/rootfs/bb.org/testing/2018-01-14/stretch-console/

I have verified that the LCD and touch work using the ts_test program from the libts-bin package (thank Robert for adding the libts packages!).

I have also tested the LCD and touch with SDL1.2 (again thanks to Robert for adding libsdl1.2* with directfb and libts support!).

Pygame also works fine with the updated libsdl1.2*.

Great! I know the screen “works”. Now hoe do I get a Qt4 program to work? I have tried a simple program but when I run it I get:

$ ./test
test: cannot connect to X server

The ‘-qws’ switch also doesn’t work. I think this is due to the Qt4 library not being compiled with the --embedded option (and possible other…).

I have also tried to use xvfb (Virtual Framebuffer ‘fake’ X server). But it either doesn’t work or I’m doing something wrong. When I try to run the test app I don’t get any error messages but nothing happens.

I don’t want to use a full X11 install due to the bloat. I just need a working X server so that the Qt4 program will run. I could try building Qt4 with the necessary options but last time I tried it didn’t work. I was able to get the program to run on the LCD but the touchscreen didn’t work. Of course that was with a resistive not the capacitive touchscreen. The other problem was it takes something like 40 hours to build Qt4. Agh…

Regards,
Hartley

So QT5 ( i know it's not QT4 :wink: )

Has a direcfb that is currently disabled:

  QPA backends:
    DirectFB ............. no
    EGLFS ................ yes
      EGLFS i.MX6 ........ no
      EGLFS i.MX6 Wayland. no
      EGLFS EGLDevice .... yes
      EGLFS GBM .......... yes
      EGLFS Mali ......... no
      EGLFS Raspberry Pi . no
      EGLFS X11 .......... yes

It also has a tslib option:

tslib .................. no

https://buildd.debian.org/status/fetch.php?pkg=qtbase-opensource-src&arch=armhf&ver=5.7.1%2Bdfsg-3&stamp=1484191682&raw=0

we could try rebuilding 'qtbase-opensource-src' and see what happens..

Regards,

Qt4 or Qt5 will work for me.

I wasn’t aware that Qt5 could work directly with the framebuffer. I thought QWS was needed in order to run without X. According to the following site, the QWS implementation was removed in Qt5:

http://doc.qt.io/qt-5/embedded-linux.html

Qt4 specifically states that it can work without X:

http://doc.qt.io/archives/qt-4.8/qt-embedded-linux.html

I’m willing to try either one it your willing to rebuild it :slight_smile:

Thanks,
Hartley

Hi Robert,

Any luck rebuilding Qt5? I see in rcn-ee/repos you added qtbase-opensource-src (5.7.1+dfsg-3rcnee0~stretch+20180119) but installing qt5-default gets me version 5.7.1+dfsg-3+b1.

Just and FYI, trying a simple Qt app from the console with that version results in:

$ ./simple
QXcbConnection: Could not connect to display
Aborted

Running the program with sudo results in the same error.

Hartley