[Interest] Basic builtin types of Qt unavailable
Nuno Santos
nunosantos at imaginando.pt
Fri Oct 2 11:44:10 CEST 2015
Hi,
I think I have found a solution for this problem. Adding the following
lines eliminated the problem:
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuick2Plugin().instance())->initializeEngine(view->engine(),
"QtQuick");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickControlsPlugin().instance())->initializeEngine(view->engine(),
"QtQuick.Controls");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickLayoutsPlugin().instance())->initializeEngine(view->engine(),
"QtQuick.Layouts");
However, QtGraphicalEffects keeps unavailable. I have tried to call:
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtGraphicalEffectsPlugin().instance())->registerTypes("QtGraphicalEffects.private");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtGraphicalEffectsPlugin().instance())->initializeEngine(view->engine(),
"QtQraphicalEffects");
But, it keeps unavailable. Does anyone knows how to initialize qml
resources of QtGraphicalEffects plugin on a static build of Qt?
Thanks,
Regards,
Nuno
On 01/10/2015 19:12, Nuno Santos wrote:
> Hi,
>
> I have a static build of Qt and when I try to use things like
> ButtonStyle of even a basic Button from QtQuickControls I have the
> following errors:
>
> *qrc:/QtQuick/Controls/Button.qml:66:1: BasicButton is not a type*
>
> If I try to comment down all ocurrences to Buttons, it will happen
> with other controls. I'm linking with the QtQuickControlsPlugin and
> all the necessary plugins:
>
> CONFIG(debug, debug|release) {
> LIBS += -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick.2
> qtquick2plugind.lib
> LIBS +=
> -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Window.2
> windowplugind.lib
> LIBS +=
> -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Controls
> qtquickcontrolsplugind.lib
> LIBS += -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Layouts
> qquicklayoutsplugind.lib
> LIBS += -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Extras
> qtquickextrasplugind.lib
> } else {
> LIBS += -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick.2
> qtquick2plugin.lib
> LIBS +=
> -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Window.2
> windowplugin.lib
> LIBS +=
> -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Controls
> qtquickcontrolsplugin.lib
> LIBS += -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Layouts
> qquicklayoutsplugin.lib
> LIBS += -LC:\Qt\5.6\msvc2013_opengl_x86_static\qml\QtQuick\Extras
> qtquickextrasplugin.lib
> }
>
> And i'm also calling the initialization of this plugins:
>
> 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_QtQuickControlsPlugin().instance())->registerTypes("QtQuick.Controls.Styles");
> qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickControlsPlugin().instance())->registerTypes("QtQuick.Controls.Private");
> qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickExtrasPlugin().instance())->registerTypes("QtQuick.Extras");
>
> What am I missing?
>
> Thanks in advance.
>
> Regards,
>
> Nuno
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151002/cc377bec/attachment.html>
More information about the Interest
mailing list