diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-01-31 09:39:34 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-02-12 15:33:53 +0000 |
commit | 04d4dca69d526611b60ec32e873d5de51d10be4d (patch) | |
tree | 936ec7b3d0ded1b73e538d75de79edc0fe902a00 /src/quick/items/qquickwindowattached_p.h | |
parent | 20a51e87fd15b8a6c1503b905399f7befe31114b (diff) |
Add Window.window attached property
The Window attached property exposes all kinds of window attributes,
but not the window itself. Being able to access the window is often
useful for various purposes. For example, in QML TestCase, to be able
to access the window of the TestCase so that one can call various
slots such as requestActivate().
Change-Id: Id03c9f277bb17810b41a60957011ccf07399e149
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickwindowattached_p.h')
-rw-r--r-- | src/quick/items/qquickwindowattached_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindowattached_p.h b/src/quick/items/qquickwindowattached_p.h index 5e4b2c1721..3212508fd8 100644 --- a/src/quick/items/qquickwindowattached_p.h +++ b/src/quick/items/qquickwindowattached_p.h @@ -69,6 +69,7 @@ class Q_AUTOTEST_EXPORT QQuickWindowAttached : public QObject Q_PROPERTY(QQuickItem* contentItem READ contentItem NOTIFY contentItemChanged) Q_PROPERTY(int width READ width NOTIFY widthChanged) Q_PROPERTY(int height READ height NOTIFY heightChanged) + Q_PROPERTY(QQuickWindow *window READ window NOTIFY windowChanged) public: QQuickWindowAttached(QObject* attachee); @@ -79,6 +80,7 @@ public: QQuickItem* contentItem() const; int width() const; int height() const; + QQuickWindow *window() const; Q_SIGNALS: @@ -88,9 +90,10 @@ Q_SIGNALS: void contentItemChanged(); void widthChanged(); void heightChanged(); + void windowChanged(); protected Q_SLOTS: - void windowChanged(QQuickWindow*); + void windowChange(QQuickWindow*); private: QQuickWindow* m_window; |