0

( How can i link two file ( two dialog) ) when i click on Open Second i want to go to another page ( window)

Here is the code for two file

Home.py

from PyQt5 import QtGui
import sys
from PyQt5.QtWidgets import QMainWindow, QPushButton, QApplication, QLabel

class MainWindow(QMainWindow):
   def __init__(self):
     super(MainWindow, self).__init__()


    btn = QPushButton('Open Second', self)


if __name__ == '__main__':
   app = QApplication(sys.argv)
   MW = MainWindow()
   MW.show()
   sys.exit(app.exec_())

SecondWindow.py

from PyQt5 import QtGui
import sys
from PyQt5.QtWidgets import QMainWindow, QPushButton, QApplication, QLabel

class SecondWindow(QMainWindow):
   def __init__(self):
     super(SecondWindow, self).__init__()



if __name__ == '__main__':
   app = QApplication(sys.argv)
   MW = SecondWindow()
   MW.show()
   sys.exit(app.exec_())
Adel
  • 35
  • 6

0 Answers0