diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsEditDelegate.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsEditDelegate.qml index fd969382e63..71499cc47e8 100644 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsEditDelegate.qml +++ b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsEditDelegate.qml @@ -135,23 +135,6 @@ Item { } } } - - Component { - id: boolEditor - - EditorPopup { - - editor: boolField - - StudioControls.CheckBox { - id: boolField - - property alias editValue: boolField.checked - - actionIndicatorVisible: false - } - } - } } component EditorPopup: T.Popup { @@ -225,15 +208,6 @@ Item { sourceComponent: realEditor } }, - State { - name: "bool" - when: columnType === CollectionDetails.DataType.Boolean - - PropertyChanges { - target: editorLoader - sourceComponent: boolEditor - } - }, State { name: "color" when: columnType === CollectionDetails.DataType.Color diff --git a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml index e9bdfdc675a..84a3f7f0d10 100644 --- a/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml +++ b/share/qtcreator/qmldesigner/collectionEditorQmlSource/CollectionDetailsView.qml @@ -360,6 +360,24 @@ Rectangle { } } + Component { + id: checkBoxComponent + + StudioControls.CheckBox { + id: checkBoxDelegate + + readonly property bool editValue: edit + + text: "" + actionIndicatorVisible: false + checked: checkBoxDelegate.editValue + onCheckedChanged: { + if (checkBoxDelegate.editValue !== checkBoxDelegate.checked) + edit = checkBoxDelegate.checked + } + } + } + Component { id: colorEditorComponent @@ -369,6 +387,8 @@ Rectangle { function resetSource() { if (columnType === CollectionDetails.DataType.Color) cellContentLoader.sourceComponent = colorEditorComponent + else if (columnType === CollectionDetails.DataType.Boolean) + cellContentLoader.sourceComponent = checkBoxComponent else cellContentLoader.sourceComponent = cellText } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml index 573b78012f3..7e565e3a47d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml @@ -14,7 +14,6 @@ T.CheckBox { // This property is used to indicate the global hover state property bool hover: control.hovered && control.enabled - property bool edit: false property alias actionIndicatorVisible: actionIndicator.visible property real __actionIndicatorWidth: control.style.actionIndicatorSize.width