import os import sys from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import Qt from main_window import MainWindow def main(): os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1" app = QApplication(sys.argv) app.setAttribute(Qt.AA_EnableHighDpiScaling) window = MainWindow() window.show() sys.exit(app.exec_()) if __name__ == '__main__': main()