diff options
Diffstat (limited to 'src/templates/qquickmenu_p.h')
-rw-r--r-- | src/templates/qquickmenu_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/templates/qquickmenu_p.h b/src/templates/qquickmenu_p.h index d4bb27b9..78d27556 100644 --- a/src/templates/qquickmenu_p.h +++ b/src/templates/qquickmenu_p.h @@ -63,6 +63,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickMenu : public QQuickPopup Q_OBJECT Q_PROPERTY(QVariant contentModel READ contentModel CONSTANT FINAL) Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL) + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) Q_CLASSINFO("DefaultProperty", "contentData") public: @@ -77,9 +78,15 @@ public: QVariant contentModel() const; QQmlListProperty<QObject> contentData(); + QString title() const; + void setTitle(QString &title); + protected: bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; +Q_SIGNALS: + void titleChanged(); + private: Q_DISABLE_COPY(QQuickMenu) Q_DECLARE_PRIVATE(QQuickMenu) |