diff --git a/share/qtcreator/templates/qml/qtquick_2_4/main.qml b/share/qtcreator/templates/qml/qtquick_2_4/main.qml new file mode 100644 index 00000000000..f23e94cfc05 --- /dev/null +++ b/share/qtcreator/templates/qml/qtquick_2_4/main.qml @@ -0,0 +1,19 @@ +import QtQuick 2.4 + +Rectangle { + width: 360 + height: 360 + + MouseArea { + anchors.fill: parent + onClicked: { + Qt.quit(); + } + } + + Text { + anchors.centerIn: parent + text: "Hello World" + } +} + diff --git a/share/qtcreator/templates/qml/qtquick_2_4/main.qmlproject b/share/qtcreator/templates/qml/qtquick_2_4/main.qmlproject new file mode 100644 index 00000000000..63dafff88ed --- /dev/null +++ b/share/qtcreator/templates/qml/qtquick_2_4/main.qmlproject @@ -0,0 +1,21 @@ +/* File generated by Qt Creator */ + +import QmlProject 1.1 + +Project { +// QTC_REPLACE main.qml WITH main + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/share/qtcreator/templates/qml/qtquick_2_4/template.xml b/share/qtcreator/templates/qml/qtquick_2_4/template.xml new file mode 100644 index 00000000000..a1fd1c2411e --- /dev/null +++ b/share/qtcreator/templates/qml/qtquick_2_4/template.xml @@ -0,0 +1,6 @@ + + diff --git a/share/qtcreator/templates/qml/qtquickcontrols_1_3/main.qml b/share/qtcreator/templates/qml/qtquickcontrols_1_3/main.qml new file mode 100644 index 00000000000..9923a35da28 --- /dev/null +++ b/share/qtcreator/templates/qml/qtquickcontrols_1_3/main.qml @@ -0,0 +1,29 @@ +import QtQuick 2.4 +import QtQuick.Controls 1.3 +import QtQuick.Window 2.2 + +ApplicationWindow { + title: qsTr("Hello World") + width: 640 + height: 480 + + menuBar: MenuBar { + Menu { + title: qsTr("File") + MenuItem { + text: qsTr("&Open") + onTriggered: console.log("Open action triggered"); + } + MenuItem { + text: qsTr("Exit") + onTriggered: Qt.quit(); + } + } + } + + Button { + text: qsTr("Hello World") + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } +} diff --git a/share/qtcreator/templates/qml/qtquickcontrols_1_3/main.qmlproject b/share/qtcreator/templates/qml/qtquickcontrols_1_3/main.qmlproject new file mode 100644 index 00000000000..63dafff88ed --- /dev/null +++ b/share/qtcreator/templates/qml/qtquickcontrols_1_3/main.qmlproject @@ -0,0 +1,21 @@ +/* File generated by Qt Creator */ + +import QmlProject 1.1 + +Project { +// QTC_REPLACE main.qml WITH main + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/share/qtcreator/templates/qml/qtquickcontrols_1_3/template.xml b/share/qtcreator/templates/qml/qtquickcontrols_1_3/template.xml new file mode 100644 index 00000000000..09a84aac8b8 --- /dev/null +++ b/share/qtcreator/templates/qml/qtquickcontrols_1_3/template.xml @@ -0,0 +1,6 @@ + + diff --git a/share/qtcreator/templates/qtquick/qtquick_2_4/app.pro b/share/qtcreator/templates/qtquick/qtquick_2_4/app.pro new file mode 100644 index 00000000000..fa61ce669e3 --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquick_2_4/app.pro @@ -0,0 +1,14 @@ +TEMPLATE = app + +QT += qml quick + +SOURCES += main.cpp + +RESOURCES += qml.qrc + +# Additional import path used to resolve QML modules in Qt Creator's code model +# QML_IMPORT_PATH # +QML_IMPORT_PATH = + +# Default rules for deployment. +include(../../shared/qrcdeployment.pri) diff --git a/share/qtcreator/templates/qtquick/qtquick_2_4/main.cpp b/share/qtcreator/templates/qtquick/qtquick_2_4/main.cpp new file mode 100644 index 00000000000..d76049d67eb --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquick_2_4/main.cpp @@ -0,0 +1,12 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + + return app.exec(); +} diff --git a/share/qtcreator/templates/qtquick/qtquick_2_4/main.qml b/share/qtcreator/templates/qtquick/qtquick_2_4/main.qml new file mode 100644 index 00000000000..adf7a674464 --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquick_2_4/main.qml @@ -0,0 +1,20 @@ +import QtQuick 2.4 +import QtQuick.Window 2.2 + +Window { + visible: true + width: 360 + height: 360 + + MouseArea { + anchors.fill: parent + onClicked: { + Qt.quit(); + } + } + + Text { + text: qsTr("Hello World") + anchors.centerIn: parent + } +} diff --git a/share/qtcreator/templates/qtquick/qtquick_2_4/qml.qrc b/share/qtcreator/templates/qtquick/qtquick_2_4/qml.qrc new file mode 100644 index 00000000000..5f6483ac33f --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquick_2_4/qml.qrc @@ -0,0 +1,5 @@ + + + main.qml + + diff --git a/share/qtcreator/templates/qtquick/qtquick_2_4/template.xml b/share/qtcreator/templates/qtquick/qtquick_2_4/template.xml new file mode 100644 index 00000000000..7ae7e86f7ef --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquick_2_4/template.xml @@ -0,0 +1,8 @@ + + diff --git a/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/app.pro b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/app.pro new file mode 100644 index 00000000000..1c260786ad7 --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/app.pro @@ -0,0 +1,13 @@ +TEMPLATE = app + +QT += qml quick widgets + +SOURCES += main.cpp + +RESOURCES += qml.qrc + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = + +# Default rules for deployment. +include(../../shared/qrcdeployment.pri) diff --git a/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/main.cpp b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/main.cpp new file mode 100644 index 00000000000..1e5bf587b39 --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/main.cpp @@ -0,0 +1,12 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + + return app.exec(); +} diff --git a/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/main.qml b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/main.qml new file mode 100644 index 00000000000..69a744993a2 --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/main.qml @@ -0,0 +1,28 @@ +import QtQuick 2.4 +import QtQuick.Controls 1.3 + +ApplicationWindow { + visible: true + width: 640 + height: 480 + title: qsTr("Hello World") + + menuBar: MenuBar { + Menu { + title: qsTr("File") + MenuItem { + text: qsTr("&Open") + onTriggered: console.log("Open action triggered"); + } + MenuItem { + text: qsTr("Exit") + onTriggered: Qt.quit(); + } + } + } + + Text { + text: qsTr("Hello World") + anchors.centerIn: parent + } +} diff --git a/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/qml.qrc b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/qml.qrc new file mode 100644 index 00000000000..5f6483ac33f --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/qml.qrc @@ -0,0 +1,5 @@ + + + main.qml + + diff --git a/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/template.xml b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/template.xml new file mode 100644 index 00000000000..e278d73e82b --- /dev/null +++ b/share/qtcreator/templates/qtquick/qtquickcontrols_1_3/template.xml @@ -0,0 +1,8 @@ + +