Exemplo n.º 1
0
    def setEditorData(self, editor: QWidget, index: QModelIndex) -> None:
        dst_prop = editor.metaObject().userProperty()
        if dst_prop.isValid():
            name = dst_prop.name()
            setattr(editor, name, index.data(role=Qt.EditRole))

        super().setEditorData(editor, index)
Exemplo n.º 2
0
 def setEditorData(self, editor: QWidget, index: QModelIndex) -> None:
     conf = index.data(role=Qt.EditRole)
     editor.config = conf
     super().setEditorData(editor, index)