Example #1
0
class FormatHelp(QDialog):
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)
        self.ui = Ui_FormatHelp()
        self.ui.setupUi(self)

    # Send SIGNAL
    def sendSignal(self):
        self.emit(SIGNAL("hideWindow()"))

    # Click on the "Close" button
    @pyqtSignature("on_btnClose_clicked()")
    def on_btnClose_clicked(self):
        self.sendSignal()

    # React on Escape or "Q" key press
    def keyPressEvent(self, event):
        if event.key() == Qt.Key_Escape or event.key() == Qt.Key_Q:
            self.sendSignal()
        event.ignore()  # Ignore the event

    # React on window close
    def closeEvent(self, event):
        self.sendSignal()
        event.ignore()  # Ignore the closeEvent
Example #2
0
class FormatHelp(QDialog):
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)
        self.ui = Ui_FormatHelp()
        self.ui.setupUi(self)


    # Send SIGNAL
    def sendSignal(self):
        self.emit( SIGNAL("hideWindow()") )

    # Click on the "Close" button
    @pyqtSignature("on_btnClose_clicked()")
    def on_btnClose_clicked(self):
        self.sendSignal()

    # React on Escape or "Q" key press
    def keyPressEvent(self, event):
        if event.key() == Qt.Key_Escape or event.key() == Qt.Key_Q:
            self.sendSignal()
        event.ignore()  # Ignore the event

    # React on window close
    def closeEvent(self, event):
        self.sendSignal()
        event.ignore()  # Ignore the closeEvent
Example #3
0
 def __init__(self, parent=None):
     QDialog.__init__(self, parent)
     self.ui = Ui_FormatHelp()
     self.ui.setupUi(self)
Example #4
0
 def __init__(self, parent=None):
     QDialog.__init__(self, parent)
     self.ui = Ui_FormatHelp()
     self.ui.setupUi(self)