config.py 文件源码

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

项目:vivisect-py3 作者: bat-serjo 项目源码 文件源码
def __init__(self, config, parent=None):
        QtWidgets.QWidget.__init__(self, parent=parent)
        self.enviconfig = config

        lyt = QtWidgets.QFormLayout()

        optnames = list(config.keys())
        optnames.sort()

        for optname in optnames:
            optval = config.get(optname)
            cls = cfgtypes.get(type(optval))
            if cls is None:
                # print('no class: %r' % val)
                continue

            label = QtWidgets.QLabel(optname)
            clsobj = cls(config, optname, optval, parent=self)
            doc = config.getOptionDoc(optname)
            if doc is not None:
                label.setToolTip(doc)
            lyt.addRow(label, clsobj)

        self.setLayout(lyt)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号