Hello all,
strange thing I'm seeing in this code.
Somehow I have to catch the "QEvent::Close" event and call "qApp->quit()" . Otherwise the program won't close!
Anyone any idea how this is possible? It does call the event close, it want's to close, I ignore the event but nothing happens.
Cheers,
Bart.
bool frmMain
::event(QEvent* event
) {
if(event
->type
() == QEvent::User){ bC* eTemp = (bC*)event;
iTemp = eTemp->rij();
iTemp2 = eTemp->col();
knopGeklikt(iTemp,iTemp2);
event->accept();
return true;
}
//this part is needed somehow
if(event
->type
() == QEvent::Close){ qApp->quit();
event->accept();
return true;
}
//up till here
event->ignore();
return false;
}
bool frmMain::event(QEvent* event)
{
if(event->type() == QEvent::User){
bC* eTemp = (bC*)event;
iTemp = eTemp->rij();
iTemp2 = eTemp->col();
knopGeklikt(iTemp,iTemp2);
event->accept();
return true;
}
//this part is needed somehow
if(event->type() == QEvent::Close){
qApp->quit();
event->accept();
return true;
}
//up till here
event->ignore();
return false;
}
To copy to clipboard, switch view to plain text mode
Bookmarks