Skip to content
Advertisement

How do I configure QT5 without Xlib

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 ?

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement