QItemEditorCreatorBase¶
The QItemEditorCreatorBase
class provides an abstract base class that must be subclassed when implementing new item editor creators. More…

Detailed Description¶
QItemEditorCreatorBase
objects are specialized widget factories that provide editor widgets for one particular QVariant data type. They are used by QItemEditorFactory
to create editors for QStyledItemDelegate
s. Creator bases must be registered with registerEditor()
.
An editor should provide a user property for the data it edits. QItemDelagates can then access the property using Qt’s meta-object system to set and retrieve the editing data. A property is set as the user property with the USER keyword:
Q_PROPERTY(QColor color READ color WRITE setColor USER true)
If the editor does not provide a user property, it must return the name of the property from ; delegates will then use the name to access the property. If a user property exists, item delegates will not call .
QStandardItemEditorCreator
is a convenience template class that can be used to register widgets without the need to subclass QItemEditorCreatorBase
.
See also
QStandardItemEditorCreator
QItemEditorFactory
Model/View Programming Color Editor Factory Example
-
class
PySide6.QtWidgets.
QItemEditorCreatorBase
¶
-
PySide6.QtWidgets.QItemEditorCreatorBase.
createWidget
(parent)¶ - Parameters
parent –
PySide6.QtWidgets.QWidget
- Return type
-
PySide6.QtWidgets.QItemEditorCreatorBase.
valuePropertyName
()¶ - Return type
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.