I have a QMainWindow that spawns another QMainWindow. When the second
QMainWindow is closed by the x button in the upper right corner, I want some
stuff to happen in the first QMainWindow. This is what I have:
class MainWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
def EnterDrawMode(self):
drawWindow = DrawWindow(self)
drawWindow.show()
self.connect(drawWindow, SIGNAL("destroyed()"), self.Test)
def Test(self):
print "exit"
#do stuff
class DrawWindow(QMainWindow):
def __init__(self, parent):
QMainWindow.__init__(self, parent)
self.setObjectName("DrawWindow")
self.setFixedSize(200, 200)
However, when I close DrawWindow, nothing happens. What am I doing wrong?
--
View this message in context:
http://old.nabble.com/Problem-with-destroyed%28%29-signal-and-QMainWindow-tp29472790p29472790.html
Sent from the PyQt mailing list archive at Nabble.com.
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt