blob: e5c75e88bcf68e3911692a1927d5e031d5d10414 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
..
---------------------------------------------------------------------------
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
All rights reserved.
This work, unless otherwise expressly stated, is licensed under a
Creative Commons Attribution-ShareAlike 2.5.
The full license document is available from
http://creativecommons.org/licenses/by-sa/2.5/legalcode .
---------------------------------------------------------------------------
How do I quit my application?
=============================
The :qt:`QML global Qt <qml-qt.html>` object provides useful enums and functions from Qt. We use the :qt:`Qt.quit() <qml-qt.html#quit-method>` method in order to quit an application:
.. code-block:: js
import QtQuick 1.1
Rectangle {
width: 360
height: 360
MouseArea {
anchors.fill: parent
onClicked: Qt.quit()
}
}
|