Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QItemEditorCreatorBase class provides an abstract base class that must be subclassed when implementing new item editor creators. More...
#include <QItemEditorCreatorBase>
Inherited by QStandardItemEditorCreator.
This class was introduced in Qt 4.2.
The QItemEditorCreatorBase class provides an abstract base class that must be subclassed when implementing new item editor creators.
Item editor creators are specialized widget factories that provide editor widgets for specific types of item data. QItemEditorFactory finds the appropriate factory for editors using a QVariant-based scheme to associate data types with editor creators.
QStandardItemEditorCreator is a convenience template class that can be used to register widgets without the need to subclass QItemEditorCreatorBase.
See also QStandardItemEditorCreator, QItemEditorFactory, and Model/View Programming.
Destroys the editor creator object.
Returns an editor widget with the given parent.
When implementing this function in subclasses of this class, you must construct and return new editor widgets with the parent widget specified.
Returns the name of the property used to get and set values in the creator's editor widgets.
When implementing this function in subclasses, you must ensure that the editor widget's property specified by this function can accept the type the creator is registered for. For example, a creator which constructs QCheckBox widgets to edit boolean values would return the checkable property name from this function, and must be registered in the item editor factory for the QVariant::Bool type.
Note: Since Qt 4.2 the item delegates query the user property of widgets, and only call this function if the widget has no user property. You can override this behavior by reimplementing QAbstractItemDelegate::setModelData() and QAbstractItemDelegate::setEditorData().
See also QMetaObject::userProperty() and QItemEditorFactory::registerEditor().
Copyright © 2007 Trolltech | Trademarks | Qt 4.2.3 |