diff --git a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml index afc4be51866..6aaad4eaa13 100644 --- a/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml +++ b/share/qtcreator/qmldesigner/materialEditorQmlSources/MaterialEditorTopSection.qml @@ -197,6 +197,7 @@ Column { // Section with hidden header is used so properties are aligned with the other sections' properties hideHeader: true width: parent.width + collapsible: false SectionLayout { PropertyLabel { text: qsTr("Name") } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml index 143ec349d04..69cf7c77953 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml @@ -51,6 +51,7 @@ Item { property int level: 0 property int levelShift: 10 property bool hideHeader: false + property bool collapsible: true property bool expandOnClick: true // if false, toggleExpand signal will be emitted instead property bool addTopPadding: true property bool addBottomPadding: true @@ -70,7 +71,10 @@ Item { Connections { target: Controller - function onCollapseAll() { section.expanded = false } + function onCollapseAll() { + if (collapsible) + section.expanded = false + } function onExpandAll() { section.expanded = true } } @@ -142,6 +146,9 @@ Item { acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: function(mouse) { if (mouse.button === Qt.LeftButton) { + if (!section.collapsible && section.expanded) + return + transition.enabled = true if (section.expandOnClick) section.expanded = !section.expanded