[Qt-interest] Bug in QMdiArea or QMdiSubWindow wrt QCloseEvent under Linux but not Windows?

Andreas Ntaflos daff at pseudoterminal.org
Sun Jun 14 03:37:36 CEST 2009


Hi all, 

I believe I have found a bug in QMdiArea or QMdiSubWindow that is 
present at least in the Linux/X11 open source version of Qt 4.5.1 
(directly from the Qt Software website). It is best reproducible with 
the MDI example application (examples/mainwindows/mdi) which lets you 
open a text file into a QTextEdit. When the MDI application is closed 
without saving the changes made to the file a dialog pops up, asking 
if the changes should be saved, discarded or if the exiting should be 
cancelled. 

Now under Windows XP SP2, Qt 4.5.1 from Qt Software pressing Cancel 
results in cancelling the application exit, as one would expect. The 
program keeps running. But under X11/Linux (Ubuntu 8.04 here, Qt 
4.5.1 from Qt Software) pressing Cancel still results in the 
application exiting. 

This is easily reproducible if one has access to both an X11/Linux and 
a Windows installation of Qt.

I believe the problem is that the QMdiSubWindow doesn't correctly 
ignore the QCloseEvent it gets, or the QMainWindow or QMdiArea 
doesn't correctly acknowledge that the QMdiSubWindow has ignored the 
event. Note that the Application example, which uses only the 
QMainWindow API but not QMdiArea/QMdiSubWindow, doesn't exhibit this 
behaviour. The problem also doesn't appear when trying to close only 
the QMdiSubWindow in which the changes have been made but not saved. 
There pressing Cancel correctly results in the QMdiSubWindow ignoring 
the QCloseEvent.

Can anyone confirm?

Andreas
-- 
Andreas Ntaflos 
Vienna, Austria 

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2494 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090614/f0d91d5d/attachment.bin 


More information about the Qt-interest-old mailing list