from fbs_runtime.application_context.PySide2 import ApplicationContext from package.main_window import MainWindow import sys if __name__ == '__main__': appctxt = ApplicationContext() # 1. Instantiate ApplicationContext window = MainWindow() window.resize(1920 / 2, 1200 / 2) window.show() exit_code = appctxt.app.exec_() # 2. Invoke appctxt.app.exec_() sys.exit(exit_code)
def run(self): window = MainWindow(ctx=self) window.resize(1920 / 4, 1200 / 2) window.show() return self.app.exec_()
def run(self): main_window = MainWindow(ctx=self) main_window.resize(1300, 800) main_window.show() return self.app.exec_()
def run(self): main_window = MainWindow(ctx=self) main_window.resize(int(1920 / 4), int(1080 / 2)) main_window.show() return self.app.exec_()