forked from qt-creator/qt-creator
QmlDesigner: Add missing functionality to QtObjectPane
It should be also possible to change types for non items. Change-Id: Ia44a8b4fda97c5fb25e513c6b3c3eed15abb1c1d Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -53,10 +53,54 @@ Rectangle {
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
z: 2
|
||||
|
||||
Label {
|
||||
text: backendValues.className.value
|
||||
width: lineEdit.width
|
||||
RoundedPanel {
|
||||
Layout.fillWidth: true
|
||||
height: 24
|
||||
|
||||
Label {
|
||||
x: 6
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 16
|
||||
|
||||
text: backendValues.className.value
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
ToolTipArea {
|
||||
anchors.fill: parent
|
||||
onDoubleClicked: {
|
||||
typeLineEdit.text = backendValues.className.value
|
||||
typeLineEdit.visible = ! typeLineEdit.visible
|
||||
typeLineEdit.forceActiveFocus()
|
||||
}
|
||||
tooltip: qsTr("Change the type of this item.")
|
||||
enabled: !modelNodeBackend.multiSelection
|
||||
}
|
||||
|
||||
ExpressionTextField {
|
||||
z: 2
|
||||
id: typeLineEdit
|
||||
completeOnlyTypes: true
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
visible: false
|
||||
|
||||
showButtons: false
|
||||
fixedSize: true
|
||||
|
||||
onEditingFinished: {
|
||||
if (visible)
|
||||
changeTypeName(typeLineEdit.text.trim())
|
||||
visible = false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Item {
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 16
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user