コード例 #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
コード例 #2
0
ファイル: FormatHelp.py プロジェクト: gilcn/nextshows
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
コード例 #3
0
 def __init__(self, parent=None):
     QDialog.__init__(self, parent)
     self.ui = Ui_FormatHelp()
     self.ui.setupUi(self)
コード例 #4
0
ファイル: FormatHelp.py プロジェクト: gilcn/nextshows
 def __init__(self, parent=None):
     QDialog.__init__(self, parent)
     self.ui = Ui_FormatHelp()
     self.ui.setupUi(self)