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)
评论列表
文章目录