diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir | 1 | ||||
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml | 47 |
2 files changed, 45 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir index 10f92a578a..40241fe958 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir @@ -39,3 +39,4 @@ TabView 2.0 TabView.qml ToolTipArea 2.0 ToolTipArea.qml UrlChooser 2.0 UrlChooser.qml PaddingSection 2.0 PaddingSection.qml +RoundedPanel 2.0 RoundedPanel.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 073364685b..92d2b8b10d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -53,9 +53,50 @@ Rectangle { SecondColumnLayout { - 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.visible = ! typeLineEdit.visible + typeLineEdit.forceActiveFocus() + } + tooltip: qsTr("Change the type of this item.") + } + + LineEdit { + id: typeLineEdit + + anchors.fill: parent + + visible: false + + backendValue: className.id + + text: backendValues.className.value + + showTranslateCheckBox: false + showExtendedFunctionButton: false + onEditingFinished: { + visible = false + changeTypeName(typeLineEdit.text) + } + } + + } + Item { + Layout.preferredWidth: 16 + Layout.preferredHeight: 16 } } |