forked from qt-creator/qt-creator
QmlDesigner: Add alias export to QtObject
Change-Id: If1a78463d4f1625105ab1fad7e179e645be08c9e Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -67,19 +67,28 @@ Rectangle {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: lineEdit
|
id: lineEdit
|
||||||
enabled: isBaseState
|
|
||||||
backendValue: backendValues.id
|
backendValue: backendValues.id
|
||||||
placeholderText: qsTr("id")
|
placeholderText: qsTr("id")
|
||||||
text: backendValues.id.value
|
text: backendValues.id.value
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
width: 240
|
||||||
showTranslateCheckBox: false
|
showTranslateCheckBox: false
|
||||||
showExtendedFunctionButton: 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
|
Image {
|
||||||
Item {
|
visible: !modelNodeBackend.multiSelection
|
||||||
width: 0
|
Layout.preferredWidth: 16
|
||||||
height: 1
|
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.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user