Problem with aboutToQuit().
I have a problem with having an aboutToQuit() function.
Code:
// THIS IS INT MAIN()'s end.
int end = Qapp.exec();
QObject::connect(&Qapp,
SIGNAL(aboutToQuit
()), qwCoreWindow,
SLOT(almostQutting
()));
return end;
}
// declared thru CoreWindow as public slot
void CoreWindow::almostQuitting(){
switch (QMB2.exec()) {
break;
default:
break;
}
CP.SaveDefaultSettings(size(), pos());
}
I added the message box to see what changes. Because it wasn't saving the registry (SaveDefaultSettings).
I wanted to see if it remembered the QSize and QPoint (position) of the main window which is CoreWindow...
Any help is appreciated.
Re: Problem with aboutToQuit().
Quote:
Originally Posted by
VireX
int end = Qapp.exec();
QObject::connect(&Qapp, SIGNAL(aboutToQuit()), qwCoreWindow, SLOT(almostQutting()));
Try:
Code:
QObject::connect(&Qapp,
SIGNAL(aboutToQuit
()), qwCoreWindow,
SLOT(almostQutting
()));
int end = Qapp.exec();
As the aboutToQuit() is emitted before QCoreApplication::exec() returns.
Re: Problem with aboutToQuit().
It didn't work that way before so that's why I posted it that way.
Re: Problem with aboutToQuit().
Shouldn't it be SLOT(almostQuitting())?
Re: Problem with aboutToQuit().
LoL....................... you guys need smileys for these kinds of situations. I musta read over everything so many times, but that psychological thing that blocks your mind from reading certain letters messed me up:
Cn yu rd ths sttmnt r nt?
And yep, I guess I should still stay in newbie section ^^.