Skip to content

Commit a2db6f8

Browse files
committed
Initial commit.
0 parents  commit a2db6f8

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed

Pairs.pro

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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)

deployment.pri

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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)

main.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

main.qml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
}

qml.qrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<RCC>
2+
<qresource prefix="/">
3+
<file>main.qml</file>
4+
</qresource>
5+
</RCC>

0 commit comments

Comments
 (0)