File tree Expand file tree Collapse file tree 9 files changed +1494
-0
lines changed
Expand file tree Collapse file tree 9 files changed +1494
-0
lines changed Original file line number Diff line number Diff line change 1+ import QtQuick 2.0
2+
3+ Rectangle {
4+ width: 100
5+ height: 62
6+ }
Original file line number Diff line number Diff line change 1+ TEMPLATE = app
2+
3+ QT += qml quick widgets
4+
5+ SOURCES += main.cpp
6+
7+ RESOURCES += qml.qrc
8+
9+ # Additional import path used to resolve QML modules in Qt Creator's code model
10+ QML_IMPORT_PATH =
11+
12+ # Default rules for deployment.
13+ include (deployment.pri )
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ android-no-sdk {
2+ target.path = /data/user/qt
3+ export(target.path)
4+ INSTALLS += target
5+ } else:android {
6+ x86 {
7+ target.path = /libs/x86
8+ } else: armeabi-v7a {
9+ target.path = /libs/armeabi-v7a
10+ } else {
11+ target.path = /libs/armeabi
12+ }
13+ export(target.path)
14+ INSTALLS += target
15+ } else:unix {
16+ isEmpty (target.path ) {
17+ qnx {
18+ target.path = /tmp/ $${TARGET }/bin
19+ } else {
20+ target.path = /opt/ $${TARGET }/bin
21+ }
22+ export(target.path)
23+ }
24+ INSTALLS += target
25+ }
26+
27+ export(INSTALLS)
Original file line number Diff line number Diff line change 1+ #include < QApplication>
2+ #include < QQmlApplicationEngine>
3+
4+ int main (int argc, char *argv[])
5+ {
6+ QApplication 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.2
2+ import QtQuick.Controls 1.1
3+
4+ import "pages"
5+
6+ ApplicationWindow {
7+ visible: true
8+ width: 320
9+ height: 568
10+ title: qsTr (" Hello World" )
11+
12+ StackView {
13+ id: pageStack
14+
15+ delegate: StackViewDelegate {
16+ pushTransition: StackViewTransition {
17+ PropertyAnimation {
18+ target: enterItem
19+ property: " y"
20+ from: 568
21+ to: 0
22+ easing .type : Easing .InOutQuad
23+ duration: 300
24+ }
25+ }
26+ popTransition: StackViewTransition {
27+ PropertyAnimation {
28+ target: exitItem
29+ property: " y"
30+ from: 0
31+ to: 568
32+ easing .type : Easing .InOutQuad
33+ duration: 300
34+ }
35+ }
36+ }
37+
38+ initialItem: MainPage {
39+ // anchors.fill: parent
40+ }
41+ }
42+
43+
44+
45+ Text {
46+ text: qsTr (" Hello World" )
47+ anchors .centerIn : parent
48+ }
49+ }
Original file line number Diff line number Diff line change 1+ import QtQuick 2.2
2+ import QtQuick.Controls 1.1
3+
4+ Item {
5+ Rectangle {
6+ id: titleBar
7+ anchors .left : parent .left
8+ anchors .right : parent .right
9+ anchors .top : parent .top
10+ height: 44
11+ color: " white"
12+ Label {
13+ anchors .centerIn : parent
14+ text: " All Contacts"
15+ }
16+
17+ ToolButton {
18+ anchors .right : parent .right
19+ anchors .verticalCenter : parent .verticalCenter
20+ text: " +"
21+ onClicked: {
22+ console .log (" Plus clicked" )
23+ pageStack .push (" qrc:///pages/NewContactPage.qml" )
24+ }
25+ }
26+ }
27+ Rectangle {
28+ id: searchBar
29+ anchors .left : parent .left
30+ anchors .right : parent .right
31+ anchors .top : titleBar .bottom
32+ height: 44
33+ color: " white"
34+ TextField {
35+ anchors .fill : parent
36+ horizontalAlignment: Text .AlignHCenter
37+ placeholderText: " Search"
38+ }
39+ }
40+ }
Original file line number Diff line number Diff line change 1+ import QtQuick 2.2
2+ import QtQuick.Controls 1.1
3+
4+ Item {
5+ Rectangle {
6+ id: titleBar
7+ anchors .left : parent .left
8+ anchors .right : parent .right
9+ anchors .top : parent .top
10+ height: 44
11+ color: " white"
12+ Label {
13+ anchors .centerIn : parent
14+ text: " New Contact"
15+ }
16+
17+ ToolButton {
18+ anchors .right : parent .right
19+ anchors .verticalCenter : parent .verticalCenter
20+ text: " Done"
21+ onClicked: {
22+ console .log (" Done clicked" )
23+ pageStack .pop ()
24+ }
25+ }
26+ }
27+
28+ }
Original file line number Diff line number Diff line change 1+ <RCC>
2+ <qresource prefix="/">
3+ <file>main.qml</file>
4+ <file>components/Page.qml</file>
5+ <file>pages/MainPage.qml</file>
6+ <file>pages/NewContactPage.qml</file>
7+ </qresource>
8+ </RCC>
You can’t perform that action at this time.
0 commit comments