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()
            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.



Read more here: https://stackoverflow.com/questions/68492397/pyqt5-3-window-application

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: