from fbs_runtime.application_context.PySide2 import ApplicationContext

import sys

from package.main_window import MainWindow

if __name__ == '__main__':
    appctxt = ApplicationContext()  # 1. Instantiate ApplicationContext
    window = MainWindow(ctx=appctxt)
    window.resize(1920 / 2, 1200 / 2)
    window.show()
    exit_code = appctxt.app.exec_()  # 2. Invoke appctxt.app.exec_()
    sys.exit(exit_code)
Exemple #2
0
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)
Exemple #3
0
 def run(self):
     main_window = MainWindow(ctx=self)
     main_window.resize(1300, 800)
     main_window.show()
     return self.app.exec_()
Exemple #4
0
 def run(self):
     window = MainWindow(ctx=self)
     window.resize(1920 / 4, 1200 / 2)
     window.show()
     return self.app.exec_()
Exemple #5
0
 def run(self):
     main_window = MainWindow(ctx=self)
     main_window.resize(int(1920 / 4), int(1080 / 2))
     main_window.show()
     return self.app.exec_()
Exemple #6
0
import sys

from fbs_runtime.application_context.PySide2 import ApplicationContext, cached_property

from package.main_window import MainWindow

file_path_strs = sys.argv[1:] if len(sys.argv) > 1 else None

if __name__ == '__main__':
    appctxt = ApplicationContext()
    window = MainWindow(ctx=appctxt, file_path_strs=file_path_strs)
    window.resize(1000, 700)
    window.show()
    exit_code = appctxt.app.exec_()
    sys.exit(exit_code)
Exemple #7
0
from fbs_runtime.application_context.PySide2 import ApplicationContext, cached_property
from PySide2.QtWidgets import QMainWindow
from PySide2 import QtGui

import sys

from package.main_window import MainWindow


class AppContext(ApplicationContext):
    def run(self):
        self.main_window.show()
        return self.app.exec_()

    @cached_property
    def img_checked(self):
        return QtGui.QIcon(self.get_resource("images/checked.png"))

    @cached_property
    def img_unchecked(self):
        return QtGui.QIcon(self.get_resource("images/unchecked.png"))


if __name__ == '__main__':
    appctxt = AppContext()  # 1. Instantiate ApplicationContext
    window = MainWindow(appctxt)
    window.resize(1920 / 4, 1200 / 2)
    window.show()
    exit_code = appctxt.app.exec_()  # 2. Invoke appctxt.app.exec_()
    sys.exit(exit_code)