QmlDesigner: Fix auto generated sheets

Section does not have padding properties.

Change-Id: I1a527d1ea168ec7ca7eb354b99fee879950270e7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2021-04-01 16:19:32 +02:00
parent 44cd41a85b
commit 405cf39ee0

View File

@@ -669,7 +669,6 @@ QString PropertyEditorQmlBackend::templateGeneration(const NodeMetaInfo &type,
bool emptyTemplate = true; bool emptyTemplate = true;
const QString anchorLeftRight = "anchors.left: parent.left\nanchors.right: parent.right\n"; const QString anchorLeftRight = "anchors.left: parent.left\nanchors.right: parent.right\n";
const QString paddingLeftTopBottom = "leftPadding: 0\ntopPadding: 0\nbottomPadding: 0\n";
qmlTemplate += "Column {\n"; qmlTemplate += "Column {\n";
qmlTemplate += anchorLeftRight; qmlTemplate += anchorLeftRight;
@@ -680,7 +679,6 @@ QString PropertyEditorQmlBackend::templateGeneration(const NodeMetaInfo &type,
qmlTemplate += "Section {\n"; qmlTemplate += "Section {\n";
qmlTemplate += "caption: \"User added properties\"\n"; qmlTemplate += "caption: \"User added properties\"\n";
qmlTemplate += anchorLeftRight; qmlTemplate += anchorLeftRight;
qmlTemplate += paddingLeftTopBottom;
qmlTemplate += "Column {\n"; qmlTemplate += "Column {\n";
qmlTemplate += "width: parent.width\n"; qmlTemplate += "width: parent.width\n";
@@ -747,7 +745,6 @@ QString PropertyEditorQmlBackend::templateGeneration(const NodeMetaInfo &type,
qmlTemplate += "Section {\n"; qmlTemplate += "Section {\n";
qmlTemplate += QStringLiteral("caption: \"%1 - %2\"\n").arg(QString::fromUtf8(p)).arg(QString::fromUtf8(parentTypeName)); qmlTemplate += QStringLiteral("caption: \"%1 - %2\"\n").arg(QString::fromUtf8(p)).arg(QString::fromUtf8(parentTypeName));
qmlTemplate += anchorLeftRight; qmlTemplate += anchorLeftRight;
qmlTemplate += paddingLeftTopBottom;
qmlTemplate += "level: 1\n"; qmlTemplate += "level: 1\n";
qmlTemplate += "Column {\n"; qmlTemplate += "Column {\n";
qmlTemplate += "width: parent.width\n"; qmlTemplate += "width: parent.width\n";