__init__.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:lxa5 作者: linguistica-uchicago 项目源码 文件源码
def main():
    app = QApplication(sys.argv)
    app.setStyle('cleanlooks')
    app.setApplicationName("Linguistica")

    # Get screen resolution
    # Why do we need to know screen resolution?
    # Because this information is useful for setting the size of particular
    # widgets, e.g., the webview for visualizing the word neighbor manifold
    # (the bigger the webview size, the better it is for visualization!)
    resolution = app.desktop().screenGeometry()
    screen_width = resolution.width()
    screen_height = resolution.height()

    # create and display splash screen
    splash_image_path = os.path.join(os.path.dirname(__file__),
                                     'lxa_splash_screen.png')
    splash_image = QPixmap(splash_image_path)
    splash_screen = QSplashScreen(splash_image, Qt.WindowStaysOnTopHint)
    splash_screen.setMask(splash_image.mask())
    splash_screen.show()
    app.processEvents()
    time.sleep(2)

    # launch graphical user interface
    form = MainWindow(screen_height, screen_width, __version__)
    form.show()
    splash_screen.finish(form)
    app.exec_()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号