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.


Qt Code:
  1. bool frmMain::event(QEvent* event)
  2. {
  3. if(event->type() == QEvent::User){
  4. bC* eTemp = (bC*)event;
  5. iTemp = eTemp->rij();
  6. iTemp2 = eTemp->col();
  7. knopGeklikt(iTemp,iTemp2);
  8. event->accept();
  9. return true;
  10. }
  11. //this part is needed somehow
  12. if(event->type() == QEvent::Close){
  13. qApp->quit();
  14. event->accept();
  15. return true;
  16. }
  17. //up till here
  18.  
  19. event->ignore();
  20. return false;
  21. }
To copy to clipboard, switch view to plain text mode