PyQt5 3 window application

I'm trying to do an application including 3 pages. I try to do it in this way:

def moveToForm2(self):
            self.window = QtWidgets.QMainWindow()
            self.ui = Ui_Form2()

I do not encounter with a problem in the main page while hiding the first Form since it is opened as main so that the objects I wrote in if name == "main" condition are declared. However, When I attempt to switch pages from second to third, I cannot hide the Form since it is not declared outside of main function. Can you guys help me to how can i approach this problem.

Read more here:

Content Attribution

This content was originally published by Meriç Bulca at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: