What exactly do you mean that the application "doesn't stop"? Did you read about differences between QCoreApplication::exit() and ::exit()?
What exactly do you mean that the application "doesn't stop"? Did you read about differences between QCoreApplication::exit() and ::exit()?
I agree with wysota. In this case, I'm just figure how qApp->exit() called. I guess that your problem is calling QApplication::exit() before entering the application main loop. In the other word, QApplication::exit() called before QApplication::exec() executed. So if you want to stop your application before QApplication entering the main loop, call ::exit() that provided by stdlib.h.
I discovered another way to quit your Qt app before the main event loop has started a couple of days ago. I needed to quit the application within the constructor of the main window, and it seems that the following does the job:
Qt Code:
To copy to clipboard, switch view to plain text mode
X-T
That's not TRUE, in fact the application event loop has started and the Widget costructed, show, then closed by method invocation. You are misunderstand with Qt:QueuedConnection. Do you actually know what you've done?I discovered another way to quit your Qt app before the main event loop has started.
~ We are nothing in this universe ~
anoraxis (12th March 2012)
Bookmarks