示例#1
0
def test_controller_start():
    import sys
    app = QApplication(sys.argv)
    app_event_loop = QEventLoop(app)
    asyncio.set_event_loop(app_event_loop)
    w = Controller()
    w.show()
示例#2
0
文件: main.py 项目: maut/FeelUOwn
        os.mkdir(SONGS_PATH)


if __name__ == "__main__":
    ensure_data_dir()

    app = QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(True)
    app.setWindowIcon(QIcon(WINDOW_ICON))
    app.setApplicationName("FeelUOwn")
    app_event_loop = QEventLoop(app)
    asyncio.set_event_loop(app_event_loop)

    qss = QSS_PATH
    with open(qss, "r") as qssfile:
        app.setStyleSheet(qssfile.read())

    if MODE != DEBUG:
        f_handler = open(LOGFILE, 'w')
        sys.stdout = f_handler
        sys.stderr = f_handler

    w = Controller()
    w.move(QApplication.primaryScreen().geometry().center()
           - w.rect().center())
    w.show()

    app_event_loop.run_forever()

    sys.exit()
示例#3
0
文件: main.py 项目: wsdragon/FeelUOwn
        os.mkdir(SONGS_PATH)


if __name__ == "__main__":
    ensure_data_dir()

    app = QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(True)
    app.setWindowIcon(QIcon(WINDOW_ICON))
    app.setApplicationName("FeelUOwn")
    app_event_loop = QEventLoop(app)
    asyncio.set_event_loop(app_event_loop)

    qss = QSS_PATH
    with open(qss, "r") as qssfile:
        app.setStyleSheet(qssfile.read())

    if MODE != DEBUG:
        f_handler = open(LOGFILE, 'w')
        sys.stdout = f_handler
        sys.stderr = f_handler

    w = Controller()
    w.move(QApplication.primaryScreen().geometry().center() -
           w.rect().center())
    w.show()

    app_event_loop.run_forever()

    sys.exit()