File tree 5 files changed +62
-0
lines changed
5 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ TEMPLATE = app
2
+
3
+ QT += qml quick
4
+ CONFIG += c++11
5
+
6
+ SOURCES += main.cpp
7
+
8
+ RESOURCES += qml.qrc
9
+
10
+ # Additional import path used to resolve QML modules in Qt Creator's code model
11
+ QML_IMPORT_PATH =
12
+
13
+ # Default rules for deployment.
14
+ include (deployment.pri )
Original file line number Diff line number Diff line change
1
+ unix :!android {
2
+ isEmpty (target.path ) {
3
+ qnx {
4
+ target.path = /tmp/ $${TARGET }/bin
5
+ } else {
6
+ target.path = /opt/ $${TARGET }/bin
7
+ }
8
+ export(target.path)
9
+ }
10
+ INSTALLS += target
11
+ }
12
+
13
+ export(INSTALLS)
Original file line number Diff line number Diff line change
1
+ #include < QGuiApplication>
2
+ #include < QQmlApplicationEngine>
3
+
4
+ int main (int argc, char *argv[])
5
+ {
6
+ QGuiApplication app (argc, argv);
7
+
8
+ QQmlApplicationEngine engine;
9
+ engine.load (QUrl (QStringLiteral (" qrc:/main.qml" )));
10
+
11
+ return app.exec ();
12
+ }
Original file line number Diff line number Diff line change
1
+ import QtQuick 2.3
2
+ import QtQuick.Window 2.2
3
+
4
+ Window {
5
+ visible: true
6
+
7
+ MouseArea {
8
+ anchors .fill : parent
9
+ onClicked: {
10
+ Qt .quit ();
11
+ }
12
+ }
13
+
14
+ Text {
15
+ text: qsTr (" Hello World" )
16
+ anchors .centerIn : parent
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ <RCC>
2
+ <qresource prefix="/">
3
+ <file>main.qml</file>
4
+ </qresource>
5
+ </RCC>
You can’t perform that action at this time.
0 commit comments