I am trying to configure (and build) QT5 static. I want it to draw to the framebuffer and use webkit. I searched the docs but I didn't find anything on how I can do this without X. Does anyone know a way of doing this ?
-
Can you use Wayland? – Basile Starynkevitch Jan 24 '16 at 17:01
-
It should just be the plain framebuffer – Coretool Jan 24 '16 at 17:03
-
Why can't you use X11 and/or a shared library? You need a commercial license to sell a statically-linked Qt application; then, Qt will give you some support – Basile Starynkevitch Jan 24 '16 at 17:12
-
I am not going to sell anything ^^ There is no X-server on my target... – Coretool Jan 24 '16 at 17:14
2 Answers
Building Qt statically is totally orthogonal to the platform selection. Depending on your target device, you can choose between using Wayland, EGLFS, LinuxFB/DirectFB, etc.
Just be sure when you run configure
that the actual plugin you're interested in gets compiled. In other words, check configure
's final output (or read the config.summary
file generated). If the platform is not there, run configure -v
and try to see what's missing (headers, libs, ...).
You can then make any application use a given plugin by simply starting the application and passing the argument -platform eglfs|wayland|...
(or by setting the QT_QPA_PLATFORM
environment variable; or you can make it the default by mangling with the device mkspecs). More info here.
When it actually comes to static linking: this multi-platform support is implemented via plugins. A statically linked application won't have plugin loading available, so you must actually link the platform plugin into the application itself by adding something like
QTPLUGIN.platforms = eglfs
into your .pro
file. More info here.

- 21,934
- 4
- 55
- 70
-
So would : `./configure -platform linuxfb` be enough to use (only) the framebuffer ? – Coretool Jan 24 '16 at 17:25
-
1It's not a `configure` argument, it's a runtime argument for your application. – peppe Jan 24 '16 at 17:28
The best way is to use the "minimal" plugin and blit it into the framebuffer (something similar to the discussion at http://lists.qt-project.org/pipermail/development/2015-April/021160.html). However, ask your Platform vendor - check if "eglfs with fb" is a supported option.
However be aware that things like Cursor, overlays, rotation, vsync handling, GPU acceleration, may not be fully supported in these non-mainstream options on Linux.

- 3,356
- 2
- 23
- 25
-
-
1Its a platform plugin for rendering the output to a raw file (filled with pixels representing the screen). Refer to http://stackoverflow.com/questions/21488072/what-is-the-use-of-various-qt-platform-plugins. Refer to http://gpupowered.org/node/20 for (slightly outdated) build steps of minimal plugin for an ARM platform (Beagle). Note that this plugin is built in the default configuration itself. You use it as ./yourqt5_app -platform minimal – Prabindh Jan 24 '16 at 17:31