Exemple #1
0
def main():
    """Creates application and main window and sets application icon."""
    app = QApplication(sys.argv)
    app.setWindowIcon(QIcon('resources/img/icon.svg'))
    window = MainWindow()
    screen = QRect(app.desktop().availableGeometry())
    x = screen.left() + (screen.width() - window.width()) / 2
    y = screen.top() + (screen.height() - window.height()) / 2
    window.move(x, y)
    window.show()
    sys.exit(app.exec_())