From 9da6c2f43bafe9adcb26c1e4247b33230a956074 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 19 Jun 2019 09:16:46 +0200 Subject: QmlDesigner: Add alias export to QtObject Change-Id: If1a78463d4f1625105ab1fad7e179e645be08c9e Reviewed-by: Thomas Hartmann --- .../QtQuick/QtObjectPane.qml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'share') diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml index c7e978a53f..67e0cff45a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml @@ -67,19 +67,28 @@ Rectangle { SecondColumnLayout { LineEdit { id: lineEdit - enabled: isBaseState + backendValue: backendValues.id placeholderText: qsTr("id") text: backendValues.id.value Layout.fillWidth: true + width: 240 showTranslateCheckBox: false showExtendedFunctionButton: false + enabled: !modelNodeBackend.multiSelection } - // workaround: without this item the lineedit does not shrink to the - // right size after resizing to a wider width - Item { - width: 0 - height: 1 + + Image { + visible: !modelNodeBackend.multiSelection + Layout.preferredWidth: 16 + Layout.preferredHeight: 16 + source: hasAliasExport ? "image://icons/alias-export-checked" : "image://icons/alias-export-unchecked" + ToolTipArea { + enabled: !modelNodeBackend.multiSelection + anchors.fill: parent + onClicked: toogleExportAlias() + tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.") + } } } } -- cgit v1.2.3