You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, April 28th 2005, 10:08pm

[SOLVED] Quit and Minimize

hello,

I cannot figure out howto do this:
the "X" in the titlebar "hides" the application
the "Quit" in the menu and the "Quit" from the KSystemTray close the application.

I had a look in some apps but I couldn't find the trick :(

I know that I can avoid "closing" the app when overwriting
void QWidget::closeEvent(QCloseEvent *e)
and using e->ignore()
But the "Quit" Actions should close my app.

Is KAction the thing what I'm looking for? Sorry, but I can't find the solution...

thanks in advance!

This post has been edited 1 times, last edit by "hephaistos6" (Apr 29th 2005, 7:27am)


Krasu

Beginner

Posts: 30

Location: Republic of Belarus

  • Send private message

2

Friday, April 29th 2005, 12:19am

RE: Quit and Minimize

man QApplication

Source code

1
2
3
4
5
6
7
void Class::slotQuit()
{
        /* do something important before quit */
        /* ... */

        qApp->quit();
}

This post has been edited 1 times, last edit by "Krasu" (Apr 29th 2005, 12:20am)


3

Friday, April 29th 2005, 7:27am

thanks!
didn't see this.
works great ^^