Exemple #1
0
    def __init__(self):
        super(DesignerWindow, self).__init__()

        # Set up the user interface from Designer.
        self.ui = Ui_DesignerWindow()
        self.ui.setupUi(self)
        # Load the content from the file -- relative paths don't seem to work in Qt
        f = open(globals.application_path + 'LEDgoesDrawingTool.html', 'r')
        html = f.read()
        self.ui.webView.setHtml(html)
        #self.setWindowIcon(QIcon('LEDgoes-Icon.ico'))

        # Set listeners
        self.ui.actionAbout_LEDgoes_PC_Interface.toggled.connect(
            self.showAbout)

        # Set up a monitor so things running in other threads can write to the Designer too
        self.ui.webView.page().setLinkDelegationPolicy(
            QWebPage.DelegateAllLinks)
        self.ui.webView.linkClicked.connect(self.reactToLinkClicked)