[Solved] Keep my app running...
-
Hi guys.
I'm developing an application which should run in background, and sometimes should show different dialogs. It has a tray icon in taskbar and everything is working fine, but I have one problem I wasn't able to solve. When the first dialog is closed, the application terminates and this is not the behavior I want to have (I want the app to be running, even after the dialog closes). To solve this, I added an empty dialog in the system which is created at startup but hidden. This also didn't solve the problem. If I don't hide the empty dialog and keep it shown, the application doesn't terminate.
I know there should be an easy solution to my problem, I just don't know where to look :)
I just want my app to keep running after the dialogs are closed.Your help is much appreciated.
Thanks -
You should use the property "quitOnLastWindowClosed":http://doc.qt.nokia.com/latest/qapplication.html#quitOnLastWindowClosed-prop of the QApplication object. Setting this to false should do the trick.