[Qt-interest] Difference between Window Close Button & Close action?

Geoffrey Hutchison geoffh at pitt.edu
Wed Aug 26 22:40:43 CEST 2009


Hi,

I must admit, I'm confused by this bug. On the Mac, I have set the  
"Close" menu item to call the MainWindow::close() method, which  
triggers some code in the closeEvent() method.

Somehow, when you pick the menu item, everything works as expected --  
I hide the window.

But if you click the close button in the title bar, the window is  
completely destroyed after closeEvent(), even though I call event- 
 >ignore().

Any idea why the close button gives a different result than  
MainWindow::close()?

Thanks,
-Geoff



More information about the Qt-interest-old mailing list