[Interest] QML resources for Qt plugins are not being correctly registered on static build of Qt
Nuno Santos
nunosantos at imaginando.pt
Sun Sep 20 22:47:21 CEST 2015
Hi,
When opening a QML window on a app compiled with a static build of Qt it complains about missing modules:
qrc:/qml/main.qml:1:1: module "QtQuick" is not installed
qrc:/qml/main.qml:2:1: module "QtQuick.Window" is not installed
qrc:/qml/main.qml:1:1: module "QtQuick" is not installed
qrc:/qml/main.qml:2:1: module "QtQuick.Window" is not installed
I have managed to workaround this by manually calling the registering functions:
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuick2Plugin().instance())->registerTypes("QtQuick");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuick2WindowPlugin().instance())->registerTypes("QtQuick.Window");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickControlsPlugin().instance())->registerTypes("QtQuick.Controls");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickExtrasPlugin().instance())->registerTypes("QtQuick.Extras");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickControlsPlugin().instance())->registerTypes("QtQuick.Controls.Styles");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickControlsPlugin().instance())->registerTypes("QtQuick.Controls.Private”);
However, this doesn’t to be sufficient because then it doesn’t complain about the modules anymore but it can’t find the respective QML files of the plugin.
Is this a known bug? Is there any manual workaround for this.
Thanks,
Regards,
Nuno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150920/255a61ce/attachment.html>
More information about the Interest
mailing list