From 2784d750cfa02f2b6dfc78d83f923ee62921fdbd Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 5 Mar 2014 14:05:13 +0100 Subject: [PATCH] Make qml template more designer friendly If you open the qml file in the designer and want to move the text item you move the mouse area instead. I think it is not very intuitive. Change-Id: I41457e4f42a145433189ac45768e345ac73b262e Reviewed-by: Alessandro Portale --- share/qtcreator/templates/qml/qtquick_1_1/main.qml | 10 ++++++---- share/qtcreator/templates/qml/qtquick_2_1/main.qml | 11 +++++++---- share/qtcreator/templates/qml/qtquick_2_2/main.qml | 10 ++++++---- .../templates/qtquick/qtquick_1_1/qml/main.qml | 10 ++++++---- .../templates/qtquick/qtquick_2_1/qml/main.qml | 10 +++++----- .../templates/qtquick/qtquick_2_2/qml/main.qml | 10 +++++----- 6 files changed, 35 insertions(+), 26 deletions(-) diff --git a/share/qtcreator/templates/qml/qtquick_1_1/main.qml b/share/qtcreator/templates/qml/qtquick_1_1/main.qml index 921baa60065..e07ec04d127 100644 --- a/share/qtcreator/templates/qml/qtquick_1_1/main.qml +++ b/share/qtcreator/templates/qml/qtquick_1_1/main.qml @@ -3,15 +3,17 @@ import QtQuick 1.1 Rectangle { width: 360 height: 360 - Text { - anchors.centerIn: parent - text: "Hello World" - } + MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } + + Text { + anchors.centerIn: parent + text: "Hello World" + } } diff --git a/share/qtcreator/templates/qml/qtquick_2_1/main.qml b/share/qtcreator/templates/qml/qtquick_2_1/main.qml index 88ea490076e..542624b230d 100644 --- a/share/qtcreator/templates/qml/qtquick_2_1/main.qml +++ b/share/qtcreator/templates/qml/qtquick_2_1/main.qml @@ -3,15 +3,18 @@ import QtQuick 2.1 Rectangle { width: 360 height: 360 - Text { - anchors.centerIn: parent - text: "Hello World" - } + MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } + + Text { + anchors.centerIn: parent + text: "Hello World" + } + } diff --git a/share/qtcreator/templates/qml/qtquick_2_2/main.qml b/share/qtcreator/templates/qml/qtquick_2_2/main.qml index 0190f166d3c..6d2ddd88796 100644 --- a/share/qtcreator/templates/qml/qtquick_2_2/main.qml +++ b/share/qtcreator/templates/qml/qtquick_2_2/main.qml @@ -3,15 +3,17 @@ import QtQuick 2.2 Rectangle { width: 360 height: 360 - Text { - anchors.centerIn: parent - text: "Hello World" - } + MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } + + Text { + anchors.centerIn: parent + text: "Hello World" + } } diff --git a/share/qtcreator/templates/qtquick/qtquick_1_1/qml/main.qml b/share/qtcreator/templates/qtquick/qtquick_1_1/qml/main.qml index 460a22fc2cc..07c789d6d16 100644 --- a/share/qtcreator/templates/qtquick/qtquick_1_1/qml/main.qml +++ b/share/qtcreator/templates/qtquick/qtquick_1_1/qml/main.qml @@ -3,14 +3,16 @@ import QtQuick 1.1 Rectangle { width: 360 height: 360 - Text { - text: qsTr("Hello World") - anchors.centerIn: parent - } + MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } + + Text { + text: qsTr("Hello World") + anchors.centerIn: parent + } } diff --git a/share/qtcreator/templates/qtquick/qtquick_2_1/qml/main.qml b/share/qtcreator/templates/qtquick/qtquick_2_1/qml/main.qml index 72ffa357228..405aa668f95 100644 --- a/share/qtcreator/templates/qtquick/qtquick_2_1/qml/main.qml +++ b/share/qtcreator/templates/qtquick/qtquick_2_1/qml/main.qml @@ -6,15 +6,15 @@ Window { width: 360 height: 360 - Text { - text: qsTr("Hello World") - anchors.centerIn: parent - } - MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } + + Text { + text: qsTr("Hello World") + anchors.centerIn: parent + } } diff --git a/share/qtcreator/templates/qtquick/qtquick_2_2/qml/main.qml b/share/qtcreator/templates/qtquick/qtquick_2_2/qml/main.qml index 62984284610..f09ac334069 100644 --- a/share/qtcreator/templates/qtquick/qtquick_2_2/qml/main.qml +++ b/share/qtcreator/templates/qtquick/qtquick_2_2/qml/main.qml @@ -6,15 +6,15 @@ Window { width: 360 height: 360 - Text { - text: qsTr("Hello World") - anchors.centerIn: parent - } - MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } + + Text { + text: qsTr("Hello World") + anchors.centerIn: parent + } }