QmlDesigner: Enable Layouts in MCUs config

Task-number: QDS-11663
Change-Id: I8d5ffb9d44696e7d286561e295ecaeb0d96ca6a7
Reviewed-by: Aleksei German <aleksei.german@qt.io>
(cherry picked from commit ceb5950573)
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Aleksei German
2024-06-13 17:48:10 +02:00
committed by Thomas Hartmann
parent e23121b142
commit 14800c1c0f
5 changed files with 43 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme import StudioTheme 1.0 as StudioTheme
Section { Section {
id: root
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
caption: qsTr("Column Layout") caption: qsTr("Column Layout")
@@ -50,9 +51,10 @@ Section {
} }
PropertyLabel { PropertyLabel {
text: qsTr("Uniform cell size") text: qsTr("Uniform cell sizes")
tooltip: qsTr("Toggles all cells to have a uniform size.") tooltip: qsTr("Toggles all cells to have a uniform size.")
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6 visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
blockedByTemplate: !backendValues.uniformCellSizes.isAvailable
} }
SecondColumnLayout { SecondColumnLayout {
@@ -61,6 +63,7 @@ Section {
+ StudioTheme.Values.actionIndicatorWidth + StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellSizes backendValue: backendValues.uniformCellSizes
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6 visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellSizes.isAvailable
} }
ExpandingSpacer {} ExpandingSpacer {}

View File

@@ -7,6 +7,7 @@ import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme import StudioTheme 1.0 as StudioTheme
Section { Section {
id: root
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
caption: qsTr("Grid Layout") caption: qsTr("Grid Layout")
@@ -131,6 +132,8 @@ Section {
text: qsTr("Uniform cell sizes") text: qsTr("Uniform cell sizes")
tooltip: qsTr("Toggles all cells to have a uniform height or width.") tooltip: qsTr("Toggles all cells to have a uniform height or width.")
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6 visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
blockedByTemplate: !(backendValues.uniformCellHeights.isAvailable
&& backendValues.uniformCellWidths.isAvailable)
} }
SecondColumnLayout { SecondColumnLayout {
@@ -140,6 +143,7 @@ Section {
+ StudioTheme.Values.actionIndicatorWidth + StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellHeights backendValue: backendValues.uniformCellHeights
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6 visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellHeights.isAvailable
} }
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap } Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
@@ -150,6 +154,7 @@ Section {
+ StudioTheme.Values.actionIndicatorWidth + StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellWidths backendValue: backendValues.uniformCellWidths
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6 visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellWidths.isAvailable
} }
ExpandingSpacer {} ExpandingSpacer {}

View File

@@ -7,6 +7,7 @@ import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme import StudioTheme 1.0 as StudioTheme
Section { Section {
id: root
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
caption: qsTr("Row Layout") caption: qsTr("Row Layout")
@@ -50,16 +51,19 @@ Section {
} }
PropertyLabel { PropertyLabel {
text: qsTr("Uniform cell size") text: qsTr("Uniform cell sizes")
tooltip: qsTr("Toggles all cells to have a uniform size.") tooltip: qsTr("Toggles all cells to have a uniform size.")
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6 visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
blockedByTemplate: !backendValues.uniformCellSizes.isAvailable
} }
SecondColumnLayout { SecondColumnLayout {
CheckBox { CheckBox {
implicitWidth: StudioTheme.Values.twoControlColumnWidth implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth + StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.uniformCellSizes backendValue: backendValues.uniformCellSizes
visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6 visible: majorQtQuickVersion === 6 && minorQtQuickVersion >= 6
enabled: backendValues.uniformCellSizes.isAvailable
} }
ExpandingSpacer {} ExpandingSpacer {}

View File

@@ -45,6 +45,8 @@ VersionData {
"QtQuick.Controls.ToolButton", "QtQuick.Controls.ToolButton",
"QtQuick.Controls.ToolSeparator", "QtQuick.Controls.ToolSeparator",
"QtQuick.Controls.Tumbler", "QtQuick.Controls.Tumbler",
"QtQuick.Layouts.LayoutItemProxy",
"QtQuick.Layouts.StackLayout",
"QtQuick.Shapes.ConicalGradient", "QtQuick.Shapes.ConicalGradient",
"QtQuick.Shapes.RadialGradient" "QtQuick.Shapes.RadialGradient"
] ]
@@ -52,6 +54,7 @@ VersionData {
allowedImports: [ allowedImports: [
"QtQuick", "QtQuick",
"QtQuick.Controls", "QtQuick.Controls",
"QtQuick.Layouts",
"QtQuick.Shapes", "QtQuick.Shapes",
"QtQuick.Timeline", "QtQuick.Timeline",
"QtQuickUltralite.Extras", "QtQuickUltralite.Extras",
@@ -185,6 +188,30 @@ VersionData {
bannedProperties: ["live", "snapMode", "touchDragThreshold"] bannedProperties: ["live", "snapMode", "touchDragThreshold"]
} }
ComplexProperty {
prefix: "Layout"
bannedProperties: ["horizontalStretchFactor", "verticalStretchFactor"]
}
QtQuick.Layouts.Layout {
bannedProperties: ["horizontalStretchFactor", "verticalStretchFactor"]
}
QtQuick.Layouts.ColumnLayout {
allowedProperties: ["layoutDirection"]
bannedProperties: ["uniformCellSizes"]
}
QtQuick.Layouts.RowLayout {
allowedProperties: ["layoutDirection"]
bannedProperties: ["uniformCellSizes"]
}
QtQuick.Layouts.GridLayout {
allowedProperties: ["layoutDirection"]
bannedProperties: ["uniformCellHeights", "uniformCellWidths"]
}
//Path and Shapes related: //Path and Shapes related:
QtQuick.Path { QtQuick.Path {

View File

@@ -56,7 +56,8 @@ Project {
"Timeline", "Timeline",
"Shapes", "Shapes",
"Profiling", "Profiling",
"StudioComponents" "StudioComponents",
"Layouts"
] ]
} }