diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-26 05:28:43 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-26 05:28:43 +0000 |
| commit | 706a6412b7a2281c3b6e1f5903ae8796071faf8e (patch) | |
| tree | b90420b136acb1feb6f29124654dcf1a539181b5 /examples/GuiClient | |
| parent | ddccc1a81948a3dabc95609f0d356d67d26c4bc3 (diff) | |
| download | qxmpp-706a6412b7a2281c3b6e1f5903ae8796071faf8e.tar.gz | |
hide on closing the mainDialog
Diffstat (limited to 'examples/GuiClient')
| -rw-r--r-- | examples/GuiClient/mainDialog.cpp | 8 | ||||
| -rw-r--r-- | examples/GuiClient/mainDialog.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp index 0748422d..ae12b06a 100644 --- a/examples/GuiClient/mainDialog.cpp +++ b/examples/GuiClient/mainDialog.cpp @@ -564,7 +564,7 @@ void mainDialog::addAccountToCache() void mainDialog::action_quit() { m_xmppClient.disconnectFromServer(); - close(); + QApplication::quit(); } void mainDialog::createTrayIconAndMenu() @@ -576,3 +576,9 @@ void mainDialog::createTrayIconAndMenu() m_trayIcon.setContextMenu(&m_trayIconMenu); m_trayIcon.show(); } + +void mainDialog::closeEvent(QCloseEvent *event) +{ + hide(); + event->ignore(); +} diff --git a/examples/GuiClient/mainDialog.h b/examples/GuiClient/mainDialog.h index 2e679f4f..3e675293 100644 --- a/examples/GuiClient/mainDialog.h +++ b/examples/GuiClient/mainDialog.h @@ -53,6 +53,7 @@ public: protected: void keyPressEvent(QKeyEvent*); + void closeEvent(QCloseEvent* event); private slots: void rosterChanged(const QString& bareJid); |
