Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Static Qt build with multiple QPA plugins
We need to have a static build of Qt to be able to deploy it on our machines easily. This build will be used by two services (two separate deployments), one of them will use qminimal, another will use qxcb QPA plugins.
We would like to have just one build, and then each service will use the plugin that it needs. For example, we could use --platform to select QPA plugin.
We are using these configuration flags for our build:
-static -qpa xcb
-static -qpa minimal
This works for just one plugin, but we don't know how to combine plugins in one build.
- Is it possible to build multiple plugins statically? Like:
-static -qpa minimal xcb
- Is it is possible, how two services should be configured to use corresponding plugin? Can we use --platform flag for this?
Hi and welcome to devnet,
-qpaparameter is either one value or a semi-colon separated list to prioritise which backend to use.
If you call
/path/to/Qt_src/configure --helpyou'll have a list of available backend that you can enable in your build under "Platform backends".
We resolved this by following configuration:
Build with this:
And then at runtime we can select plugin in two ways:
--platform minimalas cmd line params to Qt application
2) By setting env variable
Pablo J. Rogina last edited by
@AnatoliyS glad you found a solution to your issue. Please don't forget to mark your post as such! Thanks.
@SGaist when we tried to use a list of values, it didn't work for us:
This application failed to start because it could not find or load the Qt platform plugin "minimal;xcb" in "". Available platform plugins are: minimal, xcb.