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() self.ui.setupUi(self.window) self.window.show() Form.hide()
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.