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_()
评论列表
文章目录