mpvQC.py 文件源码

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

项目:mpvQC 作者: Frechdachs 项目源码 文件源码
def __init__(self, parent, relativeconfpath):
        super(TextEditOptionDialog, self).__init__(parent)
        self.setAttribute(Qt.WA_DeleteOnClose, True)
        self.setWindowFlags(dialogwindowflags)
        self.setWindowTitle(relativeconfpath)
        self.conf = path.join(configlocation, relativeconfpath)
        with open(self.conf, "r", encoding="utf-8") as configfile:
            config = configfile.read()
        self.resize(640, 480)
        self.layout = QVBoxLayout()
        self.editor = RegularTextEdit()
        self.button = QPushButton(_("OK"))
        self.editor.setPlainText(config)
        self.editor.setWordWrapMode(QTextOption.NoWrap)
        self.layout.addWidget(self.editor)
        self.layout.addWidget(self.button)
        self.layout.setAlignment(self.button, Qt.AlignHCenter)
        self.button.clicked.connect(self.accept)
        self.setLayout(self.layout)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号