launch_gui.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:spyking-circus 作者: spyking-circus 项目源码 文件源码
def process_finished(self, exit_code):
        format = self.ui.edit_stdout.currentCharFormat()
        format.setFontWeight(QFont.Bold)
        if exit_code == 0:
            if self._interrupted:
                color = Qt.red
                msg = ('Process interrupted by user')
            else:
                color = Qt.green
                msg = ('Process exited normally')
        else:
            color = Qt.red
            msg = ('Process exited with exit code %d' % exit_code)
        format.setForeground(color)
        self.ui.edit_stdout.setCurrentCharFormat(format)
        self.ui.edit_stdout.appendPlainText(msg)
        self.restore_gui()
        self.ui.edit_stdout.setTextInteractionFlags(Qt.TextSelectableByMouse |
                                                    Qt.TextSelectableByKeyboard)
        self.process = None
        self.ui.btn_log.setEnabled(self.last_log_file is not None and
                                   os.path.isfile(self.last_log_file))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号