[PyQt] Closing MDI App hangs

Tobias Ramos tobalas at gmail.com
Thu Apr 8 16:38:31 BST 2010


  hi all..

i have a MDI form who is the first in the aplication, when it loads he calls
for login or other functions..
i´ve olverloaded closeevent calling a QMessagebox, but the aplication doesnt
really close.. i can see in taskmanager a python aplication running.
the mainwindow has no parent and all other windows is child of this one.
So. What is the best way to close an application? or initiate an application
through mdi class is not the right path to follow?

-- closevent code
 def closeEvent(self, event):

        reply = QMessageBox.question(self, 'Confirma',
            "Fechar o aplicativo?", QMessageBox.Yes,QMessageBox.No)
        if reply == QMessageBox.Yes:
            self.mdi.closeAllWindows()
            event.accept()
        else:
            event.ignore()

seconds after the windows report an application crash.

Tobias
Where the wild pão de queijo grows.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100408/f9e8fde8/attachment.html>


More information about the PyQt mailing list