aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2021-08-19 13:18:42 +0200
committerHenning Gründl <henning.gruendl@qt.io>2021-08-19 11:21:19 +0000
commite3ac8a79b94fe3d9395b530434fa1554f9df4eaa (patch)
treeb67370818dd19e1198695fd46eef31ff85a6b2bf /share
parent468b2aec2dbb186601a8e661a6869b7b5d29aa06 (diff)
QmlDesigner: Fix editable ComboBox
* Fix editbale ComboBox by replacing TapHandler with MouseArea as nested TapHandler doesn't get triggered anymore with Qt 6 * Remove unnecessary when condition in ComboBox Task-number: QDS-4905 Change-Id: I11439c1bb2c1dac8709bf7e1744b33990d9a1f86 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml35
2 files changed, 13 insertions, 24 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
index 534ef22591..c5919d2ef2 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
@@ -258,7 +258,7 @@ T.ComboBox {
},
State {
name: "edit"
- when: myComboBox.enabled && myComboBox.edit && myComboBox.editable && !myComboBox.open
+ when: myComboBox.enabled && myComboBox.edit && !myComboBox.open
PropertyChanges {
target: myComboBox
wheelEnabled: true
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml
index 663e7993f1..6d926b034c 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBoxInput.qml
@@ -64,11 +64,15 @@ TextInput {
border.width: 0
}
- TapHandler {
- id: tapHandler
- acceptedDevices: PointerDevice.Mouse
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
enabled: true
- onTapped: {
+ hoverEnabled: true
+ propagateComposedEvents: true
+ acceptedButtons: Qt.LeftButton
+ cursorShape: Qt.PointingHandCursor
+ onPressed: function(mouse) {
if (textInput.readOnly) {
if (myControl.popup.opened) {
myControl.popup.close()
@@ -80,18 +84,9 @@ TextInput {
} else {
textInput.forceActiveFocus()
}
- }
- }
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- enabled: true
- hoverEnabled: true
- propagateComposedEvents: true
- acceptedButtons: Qt.LeftButton
- cursorShape: Qt.PointingHandCursor
- onPressed: function(mouse) { mouse.accepted = false }
+ mouse.accepted = false
+ }
}
states: [
@@ -104,12 +99,9 @@ TextInput {
color: StudioTheme.Values.themeControlBackground
}
PropertyChanges {
- target: tapHandler
- enabled: true
- }
- PropertyChanges {
target: mouseArea
cursorShape: Qt.PointingHandCursor
+ acceptedButtons: Qt.LeftButton
}
},
State {
@@ -146,12 +138,9 @@ TextInput {
color: StudioTheme.Values.themeControlBackgroundInteraction
}
PropertyChanges {
- target: tapHandler
- enabled: false
- }
- PropertyChanges {
target: mouseArea
cursorShape: Qt.IBeamCursor
+ acceptedButtons: Qt.NoButton
}
},
State {