![]() |
Qt 6.x
The Qt SDK
|
The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase. More...
#include <qitemeditorfactory.h>
Public Member Functions | |
QItemEditorCreator (const QByteArray &valuePropertyName) | |
Constructs an editor creator object using valuePropertyName as the name of the property to be used for editing. | |
QWidget * | createWidget (QWidget *parent) const override |
\reimp | |
QByteArray | valuePropertyName () const override |
\reimp | |
![]() | |
virtual | ~QItemEditorCreatorBase () |
Destroys the editor creator object. | |
virtual QWidget * | createWidget (QWidget *parent) const =0 |
Returns an editor widget with the given parent. | |
virtual QByteArray | valuePropertyName () const =0 |
Returns the name of the property used to get and set values in the creator's editor widgets. | |
The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase.
\inmodule QtWidgets
QItemEditorCreator is a convenience template class. It uses the template class to create editors for QItemEditorFactory. This way, it is not necessary to subclass QItemEditorCreatorBase.
The constructor takes the name of the property that contains the editing data. QStyledItemDelegate can then access the property by name when it sets and retrieves editing data. Only use this class if your editor does not define a user property (using the USER keyword in the Q_PROPERTY macro). If the widget has a user property, you should use QStandardItemEditorCreator instead.
Definition at line 29 of file qitemeditorfactory.h.
|
inlineexplicit |
Constructs an editor creator object using valuePropertyName as the name of the property to be used for editing.
The property name is used by QStyledItemDelegate when setting and getting editor data.
Note that the valuePropertyName is only used if the editor widget does not have a user property defined.
Definition at line 56 of file qitemeditorfactory.h.
|
inlineoverridevirtual |
\reimp
Implements QItemEditorCreatorBase.
Definition at line 33 of file qitemeditorfactory.h.
References parent.
|
inlineoverridevirtual |