Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Close the main window and open a new one - PyQt

Tags:

qt

qt4

pyqt

pyqt4

In PyQt, is it any way to close the main window and open a new one?

In particular, I am trying to close a window and open the same window all over again. I've tried every way I could think of without success (with some resulting in segmentation fault). I need to do this because the new window will have some features according to the parameters that are passed.

like image 398
PALEN Avatar asked Oct 27 '12 23:10

PALEN


1 Answers

How about this:

....
....

def selectMode( self ):
    self.close()
    self.field_params = params

    self.show()
like image 143
Marcus Avatar answered Sep 28 '22 07:09

Marcus