How to create a child window in pyqt5?

In Qt Designer created 2 simple window:
5ccc2a486749d542940574.png
Then decided to try pressing the button "add funds" to close the main window and open 2:
5ccc2a6706f77209168735.png
But when I create the 2nd window, I have nothing in it and it does not correspond to its size
Here is the code that I wrote:
import sys
import first_window
import double_window

from PyQt5 import QtCore, QtGui, QtWidgets

class TwoWindow(QtWidgets.QMainWindow, double_window.Ui_MainWindow):
 def __inir__(self):
super().__init__()
self.setupUi(self)
#self.pushButton.clicked.connect(self.check2)



class OneWindow(QtWidgets.QMainWindow, first_window.Ui_MainWindow):
 def __init__(self, parent = None):
super().__init__(parent)
self.setupUi(self)
 self.twoWindow = None
self.pushButton.clicked.connect(self.check)

 def check(self):
 #print (5)
self.close()
 self.twoWindow = TwoWindow()
self.twoWindow.show()


def main():
 app = QtWidgets.QApplication(sys.argv)
 window = OneWindow()
window.show()
sys.exit(app.exec_())

if __name__ == "__main__":
 main()

What is the error?
March 20th 20 at 11:37
1 answer
March 20th 20 at 11:39
Solution
How to bring up a new window when clicking a Button?
But in General You have an error
class TwoWindow(QtWidgets.QMainWindow, double_window.Ui_MainWindow):
 def __inir__(self):

There must be __init__
Your version is working, it's just a typo

Find more questions by tags PythonQtPyQt