import sys from PyQt5.QtWidgets import * from PyQt5 import uic from PyQt5 import QtCore from MainWindow import Ui_MainWindow from MyUi import MyWindow if __name__ == "__main__": #QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling) app = QApplication(sys.argv) MainWindow = QMainWindow() ui = Ui_MainWindow() My_Ui = MyWindow(ui) sys.exit(app.exec_())