Python PyQt5.QtWidgets.QApplication 模块,quit() 实例源码

我们从Python开源项目中,提取了以下11个代码示例,用于说明如何使用PyQt5.QtWidgets.QApplication.quit()

项目:acbDecrypter    作者:Rieksee    | 项目源码 | 文件源码
def enter(self):
        if self.note is None:
            msg = QMessageBox()
            message = "?????????????"
            msg = msg.information(self, 'info', message,  QMessageBox.Ok, QMessageBox.Ok)
            if msg != QMessageBox.Ok:
                return
            self.key = self.key_default
        else:
            self.key = self.note[1]
        self.close()
        QApplication.quit()
项目:acbDecrypter    作者:Rieksee    | 项目源码 | 文件源码
def not_use_key(self):
        self.key = self.key_default
        self.close()
        QApplication.quit()
项目:acbDecrypter    作者:Rieksee    | 项目源码 | 文件源码
def enter(self):
        if self.note is None:
            msg = QMessageBox()
            message = "?????????????"
            msg = msg.information(self, 'info', message,  QMessageBox.Ok, QMessageBox.Ok)
            if msg != QMessageBox.Ok:
                return
            self.key = self.key_default
        else:
            self.key = self.note[1]
        self.close()
        QApplication.quit()
项目:acbDecrypter    作者:Rieksee    | 项目源码 | 文件源码
def not_use_key(self):
        self.key = ""
        self.close()
        QApplication.quit()
项目:acbDecrypter    作者:Rieksee    | 项目源码 | 文件源码
def finish(self):
        QApplication.quit()
项目:gpvdm    作者:roderickmackenzie    | 项目源码 | 文件源码
def callback_exit(self):
            QApplication.quit()
项目:inshack-2017    作者:HugoDelval    | 项目源码 | 文件源码
def terminate(self):
        self.close()
        QApplication.quit()
项目:inshack-2017    作者:HugoDelval    | 项目源码 | 文件源码
def sigint_handler(*args):
    """Handler for the SIGINT signal."""
    sys.stderr.write('\r')
    if QMessageBox.question(None, '', "Are you sure you want to quit?",
                            QMessageBox.Yes | QMessageBox.No,
                            QMessageBox.No) == QMessageBox.Yes:
        QApplication.quit()
项目:inshack-2017    作者:HugoDelval    | 项目源码 | 文件源码
def terminate(self):
        self.close()
        QApplication.quit()
项目:algorithm-trading-webapp    作者:softage0    | 项目源码 | 文件源码
def __init__(self, k_queue):
        super().__init__()
        self.S_SCREEN_NO = "0001"
        self.MARKET_LIST = {
            0: '??',
            3: 'ELW',
            4: '?????',
            5: '?????',
            6: '??',
            8: 'ETF',
            9: '??????',
            10: '???',
            30: '?3??'
        }

        self.q = k_queue
        self.qs = {
            'OnReceiveTrData': queue.Queue(),
            'OnReceiveRealData': queue.Queue(),
            'OnReceiveMsg': queue.Queue(),
            'OnReceiveChejanData': queue.Queue(),
            'OnEventConnect': queue.Queue(),
            'OnReceiveRealCondition': queue.Queue(),
            'OnReceiveTrCondition': queue.Queue(),
            'OnReceiveConditionVer': queue.Queue()
        }
        self.ocx = QAxWidget("KHOPENAPI.KHOpenAPICtrl.1")
        self.ocx.OnReceiveTrData[str, str, str, str, str, int, str, str, str].connect(self.OnReceiveTrData)
        self.ocx.OnReceiveRealData[str, str, str].connect(self.OnReceiveRealData)
        self.ocx.OnReceiveMsg[str, str, str, str].connect(self.OnReceiveMsg)
        self.ocx.OnReceiveChejanData[str, int, str].connect(self.OnReceiveChejanData)
        self.ocx.OnEventConnect[int].connect(self.OnEventConnect)
        self.ocx.OnReceiveRealCondition[str, str, str, str].connect(self.OnReceiveRealCondition)
        self.ocx.OnReceiveTrCondition[str, str, str, int, int].connect(self.OnReceiveTrCondition)
        self.ocx.OnReceiveConditionVer[int, str].connect(self.OnReceiveConditionVer)
        atexit.register(self.quit)

    ####################################################
    # Interface Methods
    ####################################################
项目:algorithm-trading-webapp    作者:softage0    | 项目源码 | 文件源码
def quit(self):
        """ Quit the server """

        self.disconnect_real_data(self.S_SCREEN_NO)
        QApplication.quit()