close one window close others
-
-
@mrjj
yes. i also tried by minimize corefm and start and then close the coreaction. same result.i just want to close all the window independently. close button will close ir's window,no other.
-
-
@mrjj
i read the link .and i also tried the setQuitOnLastWindowClosed(false); .sameso what can i do ?
@saber
Well, you must find out why.
Since doing thisint main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget a; a.show(); QWidget b; b.show(); QWidget c; c.show(); // MainWindow w; // w.show(); return app.exec(); }
Do not close at all. windows are stacked on top of each other.
So that means most likely that something in the project code does something.Use debugger and see what is going on. please breakpoint in any closeEvent for coreaction.
-
@saber
Well, you must find out why.
Since doing thisint main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget a; a.show(); QWidget b; b.show(); QWidget c; c.show(); // MainWindow w; // w.show(); return app.exec(); }
Do not close at all. windows are stacked on top of each other.
So that means most likely that something in the project code does something.Use debugger and see what is going on. please breakpoint in any closeEvent for coreaction.
-
@saber
Then set break point somewhere else :)
Like destructor.
Something must happen in code.
as default sample do NOT close all 3 windows.
and its very easy to see what is going on with the call stack so
you just need to beak it somewhere and see what is going on. -
@saber
Then set break point somewhere else :)
Like destructor.
Something must happen in code.
as default sample do NOT close all 3 windows.
and its very easy to see what is going on with the call stack so
you just need to beak it somewhere and see what is going on. -
@mrjj
ok . i try to debug.
but one thought in my mind.
i think window with tray icon with fremless is the cause?
also the close mathodQAction *QAquit=new QAction("&Quit",this); connect(QAquit, SIGNAL(triggered()),qApp,SLOT(close()));
@saber said in close one window close others:
connect(QAquit, SIGNAL(triggered()),qApp,SLOT(close()));
Didn't realise it's qApp there :-)
Sometimes it is something really small/simple and is hard to see.