Is it possible to load a QML module at runtime with a static-compiled Qt Application?
-
I have a Qt application which is statically build based on Qt 5.15.2. I would like to use the GLVideoItem module which comes with the qmlgl plugin of GStreamer.
Right now I'm trying to use the GStreamer plugin installed in the system without compile the GStreamer plugin by myself.
From the C++ side I see the plugin is found and loaded correctly because the
GstElement *sink = gst_element_factory_make("qmlglsink", nullptr);
returns me a valid pointer.However on the QML side it seems not finding the GLVideoItem module because at run-time it shows the
module "org.freedesktop.gstreamer.GLVideoItem" is not installed
error.I'm guessing it's a problem with the static build. In my cmake file I'm using the following commands to statically link the plugins.
qt5_import_qml_plugins(QGroundControl) qt5_import_plugins(QGroundControl INCLUDE Qt5::QXcbIntegrationPlugin Qt5::QVirtualKeyboardPlugin Qt5::QSvgPlugin )
My question is, is it possible to let the qml dynamically load the plugins in a static build? Or I shall static build all the plugin I need together with the application?
Thank you all in advance for your help.