diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-03-01 12:53:29 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-03-15 13:58:59 +0000 |
commit | b4c13916ec0fd7796acdf0ec5a1db0134479b3f2 (patch) | |
tree | e2c5beb07d1da652af48e045c6899739bedef3d2 /src/widgets | |
parent | a275fb3d29d5560af22ef5c4a721ce9bf2a2ccc1 (diff) | |
download | qtquickcontrols-b4c13916ec0fd7796acdf0ec5a1db0134479b3f2.tar.gz |
Enable using the module in a statically built application
Task-number: QTBUG-35754
Task-number: QTBUG-45868
Change-Id: I9bb332bc85713a17f02f3e7e768592e3234edfe3
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/widgetsplugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/widgetsplugin.cpp b/src/widgets/widgetsplugin.cpp index 7703f679..cb4fe8f8 100644 --- a/src/widgets/widgetsplugin.cpp +++ b/src/widgets/widgetsplugin.cpp @@ -44,6 +44,13 @@ #include "qquickqcolordialog_p.h" #include "qquickqfontdialog_p.h" +static void initResources() +{ +#ifdef QT_STATIC + Q_INIT_RESOURCE(qmake_QtQuick_PrivateWidgets); +#endif +} + QT_BEGIN_NAMESPACE /*! @@ -71,6 +78,7 @@ class QtQuick2PrivateWidgetsPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") public: + QtQuick2PrivateWidgetsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.PrivateWidgets")); |