Skip to content

PythonQt.QtGui.QItemEditorCreatorBase

QItemEditorCreatorBase

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

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 QStyledItemDelegates. Creator bases must be registered with QItemEditorFactory::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 valuePropertyName(); delegates will then use the name to access the property. If a user property exists, item delegates will not call valuePropertyName().

QStandardItemEditorCreator is a convenience template class that can be used to register widgets without the need to subclass QItemEditorCreatorBase.

Source: https://doc.qt.io/archives/qt-5.15/qitemeditorcreatorbase.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
createWidget function (self, parent: Any) -> Any X.createWidget(parent) -> PythonQt.QtGui.QWidget
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
valuePropertyName function (self) -> Any X.valuePropertyName() -> PythonQt.QtCore.QByteArray