tag_editor.py 文件源码

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

项目:uitester 作者: IfengAutomation 项目源码 文件源码
def __init__(self, refresh_signal, tag_name=None, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.refresh_signal = refresh_signal
        self.db_helper = DBCommandLineHelper()
        ui_dir_path = os.path.dirname(__file__)
        ui_file_path = os.path.join(ui_dir_path, 'tag_editor.ui')
        uic.loadUi(ui_file_path, self)
        # set icon
        save_icon = QIcon()
        config = Config()
        save_icon.addPixmap(QPixmap(config.images + '/save.png'), QIcon.Normal, QIcon.Off)
        self.tag_save_btn.setIcon(save_icon)
        self.tag_save_btn.clicked.connect(self.tag_save)
        self.tag_id_line_edit.hide()  # ??line_edit
        self.tag_name_line_edit.setPlaceholderText("Tag Name")  # ??????
        self.tag_description_text_edit.setPlaceholderText('Tag Description')
        if tag_name:
            self.tag = self.db_helper.query_tag_by_name(tag_name)
            self.tag_id_line_edit.setText(str(self.tag.id))
            self.tag_name_line_edit.setText(self.tag.name)
            self.tag_description_text_edit.setPlainText(self.tag.description)
            # self.tag_description_text_edit.setDocument(QTextDocument("Tag description"))  # ??????
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号