summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2022-02-23 13:39:17 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2022-02-23 12:39:49 +0000
commita62aef243886e5f76e1d426be52abe45a28e80d2 (patch)
tree0412b391a40427489a2641e497a70f533bc56b63
parent6e366c0823f0ff40273614cd905b58c2729d93ab (diff)
downloadqt-creator-a62aef243886e5f76e1d426be52abe45a28e80d2.tar.gz
QmlDesigner: Set proper size if there is no project import
Change-Id: I29d8dbbac49c694439a600cfe393c6a475362714 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/studio_templates/files/flowitem/file.qml.tpl5
-rw-r--r--share/qtcreator/qmldesigner/studio_templates/files/flowview/file.qml.tpl5
2 files changed, 10 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/studio_templates/files/flowitem/file.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/files/flowitem/file.qml.tpl
index f56eddde9d..c9fa8671cd 100644
--- a/share/qtcreator/qmldesigner/studio_templates/files/flowitem/file.qml.tpl
+++ b/share/qtcreator/qmldesigner/studio_templates/files/flowitem/file.qml.tpl
@@ -15,6 +15,11 @@ import %{ApplicationImport}
import FlowView 1.0
FlowItem {
+@if %{UseImport}
width: Constants.width
height: Constants.height
+@else
+ width: 800
+ height: 600
+@endif
}
diff --git a/share/qtcreator/qmldesigner/studio_templates/files/flowview/file.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/files/flowview/file.qml.tpl
index 07de025d54..1c8d7f0a07 100644
--- a/share/qtcreator/qmldesigner/studio_templates/files/flowview/file.qml.tpl
+++ b/share/qtcreator/qmldesigner/studio_templates/files/flowview/file.qml.tpl
@@ -12,8 +12,13 @@ import %{ApplicationImport}
import FlowView 1.0
FlowView {
+@if %{UseImport}
width: Constants.width
height: Constants.height
+@else
+ width: 800
+ height: 600
+@endif
defaultTransition: FlowTransition {
id: defaultTransition