diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-01-08 16:13:21 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:09:41 +0200 |
commit | 28e271ed80c7f1a2f3ace99109825bd15ef989fc (patch) | |
tree | 6cdf2a917b42cfd8a3553ca40ef21df6c68ff620 /src/imports/compositor | |
parent | cb592f38198e2f9e8f095b638dd0702ffcb5fa3b (diff) |
Make it possible for the WaylandCompositor items to store Components
Change-Id: I0d1d9f51f8b283b8089a36805dc7b20f121cb010
Diffstat (limited to 'src/imports/compositor')
-rw-r--r-- | src/imports/compositor/qwaylandquickcompositorplugin.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp index 94625a38f..f32ec413b 100644 --- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp +++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE class QWaylandQuickCompositorImpl : public QWaylandQuickCompositor { Q_OBJECT + Q_PROPERTY(QQmlListProperty<QObject> data READ data DESIGNABLE false) + Q_CLASSINFO("DefaultProperty", "data") public: QWaylandQuickCompositorImpl(QObject *parent = 0) : QWaylandQuickCompositor(parent) @@ -59,6 +61,11 @@ public: setInitializeLegazyQmlNames(false); } + QQmlListProperty<QObject> data() + { + return QQmlListProperty<QObject>(this, m_objects); + } + protected: void classBegin() Q_DECL_OVERRIDE { @@ -70,6 +77,8 @@ protected: create(); QWaylandQuickCompositor::componentComplete(); } +private: + QList<QObject *> m_objects; }; /*! |