Qt5 (Qml) on non-GPU hardware has always been a hot topic, here is our official stand to it:
- Qt5 without Qt Quick 2/QML (just Qt Widgets) should work fine and we can help you building such an image (make sure to not include an example which has
qtdeclarative
in its dependencies). - Qt5 with Qt Quick 2/QML on non-GPU hardware has two possible solution
- Use Software emulated OpenGL (via Mesa). While this might work for a simple Qt Quick based “Hello World” UI, we don’t believe it is a worthwhile solution for a real world use case due to performance reasons… Therefore, at this moment, this scenario is not supported by Toradex. (*)
- Use the Qt Quick 2D Renderer. Here again are two directions:
- Since Qt 5.7 the Qt Quick 2D Renderer is available under the GPLv3 Open Source License. The OpenEmbedded built Toradex BSP currently does not support Qt 5.7 hence today this option is not supported… (Note also that the terms of GPLv3 typically means that your application has to be open sourced as well).
- Use the Qt Company’s commercial offerings Qt for Device Creation. With the Qt 5.7 release Colibri iMX7 is among the supported modules and since 2016-08-23 there are pre-built demo image available through the Qt for Device Creation installer.
So to conclude: Qt5 is supported, either without Qt Quick 2 or through the Qt for Device Creation offerings of the Qt Company.
(*) Out of curiosity how the software OpenGL performs I tried to build a X11 based image with Qt5 and with Software desktop OpenGL (by adding qtbase qtbase-fonts qtbase-plugins cinematicexperience
and xserver-xorg xf86-video-fbdev xf86-input-evdev xserver-xorg-extension-glx mesa-driver-swrast xinit xterm openbox mesa-demos
). The glxgears
demo worked at 50fps and 100% CPU load, but Qt5 Cinematic Experience failed pretty hard with the following error message:
root@colibri-imx7:~# /usr/share/cinematicexperience-1.0/Qt5_CinematicExperience
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[ 593.095205] Alignment trap: not handling instruction f9008a1f at [<74f61c08>]
[ 593.102461] Unhandled fault: alignment exception (0x801) at 0x018c4a4c
[ 593.108991] pgd = 8897c000
[ 593.111749] [018c4a4c] *pgd=8921b831, *pte=8e43a75f, *ppte=8e43ac7f
Bus error
While I think it technically should be possible to get Qt5 on top of a Software emulated OpenGL running, for the above reasons we won’t support such an effort any further.