[PyKDE] qApp.quit()
Ken Godee
ken at perfect-image.com
Fri Aug 15 19:27:00 BST 2003
Vincent Wagelaar wrote:
> 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
>
Wouldn't it be....
a.quit()
More information about the PyQt
mailing list