diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml index bf02e53803..2136b9c9dc 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml @@ -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 } } |