![]() |
Qt 6.x
The Qt SDK
|
The QStandardItemEditorCreator class provides the possibility to register widgets without having to subclass QItemEditorCreatorBase. More...
#include <qitemeditorfactory.h>
Public Member Functions | |
QStandardItemEditorCreator () | |
Constructs an editor creator object. | |
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 QStandardItemEditorCreator class provides the possibility to register widgets without having to subclass QItemEditorCreatorBase.
\inmodule QtWidgets
This convenience template class makes it possible to register widgets without having to subclass QItemEditorCreatorBase.
Example:
Setting the editorFactory
created above in an item delegate via QStyledItemDelegate::setItemEditorFactory() makes sure that all values of type QMetaType::QDateTime will be edited in {MyFancyDateTimeEdit}.
The editor must provide a user property that will contain the editing data. The property is used by \l{QStyledItemDelegate}s to set and retrieve the data (using Qt's \l{Meta-Object System}{meta-object system}). You set the user property with the USER keyword:
Definition at line 41 of file qitemeditorfactory.h.
|
inline |
Constructs an editor creator object.
Definition at line 44 of file qitemeditorfactory.h.
|
inlineoverridevirtual |
\reimp
Implements QItemEditorCreatorBase.
Definition at line 47 of file qitemeditorfactory.h.
References parent.
|
inlineoverridevirtual |