summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2019-11-26 11:28:11 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2019-11-26 10:48:30 +0000
commitbec91cbad8c12e2c2dffc16611522bf463f2591a (patch)
tree035198f44faddfb103370317b3abc2e398cb1f7e
parent05bb285b0d528c7dd57bd7405e3010d7bdbd625c (diff)
downloadqt-creator-bec91cbad8c12e2c2dffc16611522bf463f2591a.tar.gz
QmlDesigner: Fix editable ComboBox popup selection
This patch introduces a new state called 'popup' to disable text editing while the popup is opened and enables text editing whenever the popup is closed. Task-number: QDS-1262 Change-Id: I74ad4723d2cfe81447e94c37e9ba1f0913790d97 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml19
1 files changed, 18 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
index 747a0d4510..1c3dc46c15 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
@@ -244,7 +244,7 @@ T.ComboBox {
},
State {
name: "edit"
- when: myComboBox.edit && myComboBox.editable
+ when: myComboBox.edit && myComboBox.editable && !comboBoxPopup.opened
PropertyChanges {
target: myComboBox
wheelEnabled: true
@@ -252,12 +252,29 @@ T.ComboBox {
PropertyChanges {
target: comboBoxInput
selectByMouse: true
+ readOnly: false
}
PropertyChanges {
target: comboBoxBackground
color: StudioTheme.Values.themeInteraction
border.color: StudioTheme.Values.themeInteraction
}
+ StateChangeScript {
+ script: comboBoxPopup.close()
+ }
+ },
+ State {
+ name: "popup"
+ when: myComboBox.edit && comboBoxPopup.opened
+ PropertyChanges {
+ target: myComboBox
+ wheelEnabled: true
+ }
+ PropertyChanges {
+ target: comboBoxInput
+ selectByMouse: false
+ readOnly: true
+ }
}
]