Hi,
I have a single QWidget that is defined and showed in the process' main function, like this:
// main.cpp
#include "main.h"
int main(int argc, char *argv[])
{
clsWindowMain windowMain();
windowMain.showMaximized();
int ret = application.exec();
delete(settings);
return ret;
}
// main.cpp
#include "main.h"
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
clsWindowMain windowMain();
windowMain.showMaximized();
int ret = application.exec();
delete(settings);
return ret;
}
To copy to clipboard, switch view to plain text mode
When I run the program and close the QWidget by mouse click, the whole process terminates.
BUT: When I create a button that should manually close the QWidget like this:
void clsWindowMain::slotButtonClicked()
{
this->close();
}
void clsWindowMain::slotButtonClicked()
{
this->close();
}
To copy to clipboard, switch view to plain text mode
... then the QWidget also closes, but the process is still working in background. I can see it when I open the process manager in windows and I can see it when I try to re-run the program...
Does anybody have a clue why it is not working?
Thank you in anticipation!
Bookmarks