summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-10 15:36:51 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-08-11 08:20:55 +0200
commit46c9f4c212e374f957942f1d16d66f20b0a2949a (patch)
treebb031dc899ed5ae6d19ddccbcae22d31798e7581 /src/gui/kernel/qguiapplication.h
parent73769d85ec13ed6b57f1eccd3618616fd03d7cb7 (diff)
Implement "quit on last window closed" logic for QWindow
Change-Id: Ide33578ad60796f3e267b09be76cda87eaf873d0 Reviewed-on: http://codereview.qt.nokia.com/2827 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication.h')
-rw-r--r--src/gui/kernel/qguiapplication.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index 8338fa1f9a..871e314540 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -76,6 +76,8 @@ class Q_GUI_EXPORT QGuiApplication : public QCoreApplication
Q_PROPERTY(int doubleClickInterval READ doubleClickInterval WRITE setDoubleClickInterval)
Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval WRITE setKeyboardInputInterval)
+ Q_PROPERTY(bool quitOnLastWindowClosed READ quitOnLastWindowClosed WRITE setQuitOnLastWindowClosed)
+
public:
QGuiApplication(int &argc, char **argv, int = ApplicationFlags);
virtual ~QGuiApplication();
@@ -123,12 +125,16 @@ public:
static QPlatformNativeInterface *platformNativeInterface();
+ static void setQuitOnLastWindowClosed(bool quit);
+ static bool quitOnLastWindowClosed();
+
static int exec();
bool notify(QObject *, QEvent *);
Q_SIGNALS:
void fontDatabaseChanged();
void screenAdded(QScreen *screen);
+ void lastWindowClosed();
protected:
bool event(QEvent *);