Hi,
I have a window and open another window with a button. Then, when the other window is closed I need to update some fields in the first one. Here's what I currently do:
MainWindow:
...
self.connect(self.actionCustomFactors, SIGNAL("triggered()"), self.OnCustomFactorsTriggered)
...
def OnCustomFactorsTriggered(self):
self.customWin = CustomWindow(self.factorsFile)
self.customWin.show()
self.connect(self.customWin, SIGNAL("destroyed()"), self.OnCustomWinClosed)
def OnCustomWinClosed(self):
self.cbProperty.clear()
...
CustomWindow:
...
self.connect(self.actionQuit, SIGNAL("triggered()"), self.Close)
...
def Close(self):
self.close()
...
which obviously only works once as the CustomWindow is only closed, not destroyed. If I open it again and then close, the whole thing crashes, I guess due to some object conflicts. What I need to do is to destroy the CustomWindow and update the MainWindow stuff on CustomWindow destruction. How can I do that?
If I replace the close() method and closed() signal for destroy() and destroyed(), the whole thing crashes with access violation errors.
Thank you.