forked from qt-creator/qt-creator
QmlDesigner: Expose state property for 3DObjects
Task-number: QDS-5225 Change-Id: I08b5839ef70dd3e3ea9ebd615646494e3667a479 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
92cb2427f8
commit
73fb9d7002
@@ -33,7 +33,9 @@ import StudioTheme 1.0 as StudioTheme
|
|||||||
PropertyEditorPane {
|
PropertyEditorPane {
|
||||||
id: itemPane
|
id: itemPane
|
||||||
|
|
||||||
ComponentSection {}
|
ComponentSection {
|
||||||
|
showState: true
|
||||||
|
}
|
||||||
|
|
||||||
GeometrySection {}
|
GeometrySection {}
|
||||||
|
|
||||||
@@ -82,22 +84,6 @@ PropertyEditorPane {
|
|||||||
|
|
||||||
ExpandingSpacer {}
|
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 {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,7 +32,9 @@ import StudioTheme 1.0 as StudioTheme
|
|||||||
PropertyEditorPane {
|
PropertyEditorPane {
|
||||||
id: itemPane
|
id: itemPane
|
||||||
|
|
||||||
ComponentSection {}
|
ComponentSection {
|
||||||
|
showState: majorVersion >= 6
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@@ -32,11 +32,14 @@ import HelperWidgets 2.0
|
|||||||
import StudioTheme 1.0 as StudioTheme
|
import StudioTheme 1.0 as StudioTheme
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
|
id: root
|
||||||
caption: qsTr("Component")
|
caption: qsTr("Component")
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
property bool showState: false
|
||||||
|
|
||||||
SectionLayout {
|
SectionLayout {
|
||||||
PropertyLabel { text: qsTr("Type") }
|
PropertyLabel { text: qsTr("Type") }
|
||||||
|
|
||||||
@@ -262,5 +265,26 @@ Section {
|
|||||||
onCanceled: hideWidget()
|
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 {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user