How to use the pyinstaller.main.MainWindow function in pyinstaller

To help you get started, we’ve selected a few pyinstaller examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ussserrr / pid-controller-gui / pyinstaller / main.py View on Github external
tivaConn.isOfflineMode = True
        DEMO_MODE = True
        print("\nDemo mode entered")
        MessageWindow(text="Due to no connection to regulator the application will start in Demo mode. All values are random. "\
                           "To exit Demo mode please restart application.")
    else:
        # if connection is present and no demo mode then create timer for connection checking
        checkConnectionTimer = QTimer()
        checkConnectionTimer.timeout.connect(checkConnectionTimerHandler)
        checkConnectionTimer.start(5000)  # every 5 seconds
        # also create handler function for connection lost (for example, when reading some coefficient from MCU)
        tivaConn.connLost.signal.connect(connLostHandler)
    # save values for restoring
    tivaConn.saveCurrentValues()

    mainWindow = MainWindow()
    mainWindow.show()

    print('\nloaded.\n')
    sys.exit(app.exec_())
github ussserrr / pid-controller-gui / pyinstaller / main.py View on Github external
def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.setWindowTitle("PID GUI application")
        self.setWindowIcon(QIcon(resource_path('img/icon.png')))

        self.formWidget = self.FormWidget()
        self.formWidget.initUI(self)
        self.setCentralWidget(self.formWidget)

        exitAction = QAction(QIcon(resource_path('img/exit.png')), 'Exit', self)
        exitAction.setShortcut('Ctrl+Q')
        exitAction.setStatusTip('Exit application')
        exitAction.triggered.connect(app.quit)

        infoAction = QAction(QIcon(resource_path('img/info.png')), 'Info', self)
        infoAction.setShortcut('Ctrl+I')
        infoAction.setStatusTip('Info & about')
        self.aboutWindow = AboutWindow()