[PyQt] QDialog reject terminating full process? (PyQt4)

Jordan O jorxster at gmail.com
Thu Mar 13 16:19:18 GMT 2014


Hi gentlemen,

I've got a minor issue with an application of mine, where a QDialog
instance, when the "X" is clicked on the upper right corner, it closes my
entire application and not just the dialog!

My application is a QSystemTrayIcon, and I have this method spawning a
subclass of QDialog

    def click_trap(self, value):
        ''' Left click tray function '''
        if value == self.Trigger: #left click!

            # create or restore
            if not self.dialog:
                self.dialog = RestartDialog(self)

                self.dialog.bring_to_front()
                self.result = self.dialog.exec_()
            else:
                self.dialog.bring_to_front()
                self.dialog.show()



And yet when I close the dialog it terminated the the entire system tray
application!

cheers,
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140313/64624754/attachment.html>


More information about the PyQt mailing list