[PyKDE] qApp.quit()

Vincent Wagelaar vincent at ricardis.tudelft.nl
Fri Aug 15 19:06:00 BST 2003


Hi,

In my maindialog i'm trying to close the application when an error has 
occurred. But my application won't stop running.

a = QApplication(sys.argv)

w = mainwindow()
a.setMainWindow(w)
a.exec_loop()


class mainwindow(QMainWindow):
    def __init__(self, *args):
         QMainWindow.__init__(self, *args)
         error = 1
         if error:
             qApp.quit()
         else:
             self.show()


This will not close the application

Please help,
Vincent




More information about the PyQt mailing list