diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-05-08 12:28:07 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-05-11 11:48:00 +0200 |
commit | e16408a19325456f7dc25f84e8863116cd2ca918 (patch) | |
tree | 72cb33f477fafd7d366f4716cf955a44cbaca80e /src | |
parent | f79cf59bf417936489055487998e51f80dd844a7 (diff) |
ComboBox: make pressed read-only
This was planned for Qt 6.
[ChangeLog][Controls][ComboBox] The pressed property is now read-only.
The down property can be used instead.
Change-Id: Ie241a420ac228207b3f564af66d3eb3738f6a145
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickcombobox.cpp | 1 | ||||
-rw-r--r-- | src/quicktemplates2/qquickcombobox_p.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index b8482a26..eb1a7be8 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -899,6 +899,7 @@ QQmlInstanceModel *QQuickComboBox::delegateModel() const /*! + \readonly \qmlproperty bool QtQuick.Controls::ComboBox::pressed This property holds whether the combo box button is physically pressed. diff --git a/src/quicktemplates2/qquickcombobox_p.h b/src/quicktemplates2/qquickcombobox_p.h index 8fbbb8fc..4874eb5d 100644 --- a/src/quicktemplates2/qquickcombobox_p.h +++ b/src/quicktemplates2/qquickcombobox_p.h @@ -66,7 +66,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickComboBox : public QQuickControl Q_PROPERTY(int count READ count NOTIFY countChanged FINAL) Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged FINAL) Q_PROPERTY(QQmlInstanceModel *delegateModel READ delegateModel NOTIFY delegateModelChanged FINAL) - Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) // ### Qt 6: should not be writable + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL) Q_PROPERTY(int highlightedIndex READ highlightedIndex NOTIFY highlightedIndexChanged FINAL) Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL) Q_PROPERTY(QString currentText READ currentText NOTIFY currentTextChanged FINAL) |