0

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 ?

Coretool
  • 415
  • 1
  • 5
  • 14

2 Answers2

3

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.

peppe
  • 21,934
  • 4
  • 55
  • 70
0

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.

Prabindh
  • 3,356
  • 2
  • 23
  • 25
  • What is this minimal plugin that you're talking about ? – Coretool Jan 24 '16 at 17:18
  • 1
    Its 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