diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 98b41da3051..a55280a0401 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -33,7 +33,9 @@ import StudioTheme 1.0 as StudioTheme PropertyEditorPane { id: itemPane - ComponentSection {} + ComponentSection { + showState: true + } GeometrySection {} @@ -82,22 +84,6 @@ PropertyEditorPane { ExpandingSpacer {} } - - PropertyLabel { text: qsTr("State") } - - SecondColumnLayout { - ComboBox { - implicitWidth: StudioTheme.Values.singleControlColumnWidth - + StudioTheme.Values.actionIndicatorWidth - width: implicitWidth - editable: true - backendValue: backendValues.state - model: allStateNames - valueType: ComboBox.String - } - - ExpandingSpacer {} - } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml index c6cd287b997..7cded878a1d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Object3DPane.qml @@ -32,7 +32,9 @@ import StudioTheme 1.0 as StudioTheme PropertyEditorPane { id: itemPane - ComponentSection {} + ComponentSection { + showState: majorVersion >= 6 + } Column { anchors.left: parent.left diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentSection.qml index f285c6a620d..7a2225bee7d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComponentSection.qml @@ -32,11 +32,14 @@ import HelperWidgets 2.0 import StudioTheme 1.0 as StudioTheme Section { + id: root caption: qsTr("Component") anchors.left: parent.left anchors.right: parent.right + property bool showState: false + SectionLayout { PropertyLabel { text: qsTr("Type") } @@ -262,5 +265,26 @@ Section { onCanceled: hideWidget() } } + + PropertyLabel { + visible: root.showState + text: qsTr("State") + } + + SecondColumnLayout { + visible: root.showState + + ComboBox { + implicitWidth: StudioTheme.Values.singleControlColumnWidth + + StudioTheme.Values.actionIndicatorWidth + width: implicitWidth + editable: true + backendValue: backendValues.state + model: allStateNames + valueType: ComboBox.String + } + + ExpandingSpacer {} + } } }