The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase. More...
#include <QItemEditorCreator>
Inherits: QItemEditorCreatorBase.
This class was introduced in Qt 4.2.
QItemEditorCreator ( const QByteArray & valuePropertyName ) |
virtual QWidget * | createWidget ( QWidget * parent ) const |
virtual QByteArray | valuePropertyName () const |
The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase.
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.
QItemEditorCreator<MyEditor> *itemCreator = new QItemEditorCreator<MyEditor>("myProperty"); QItemEditorFactory *factory = new QItemEditorFactory;
The constructor takes the name of the property that contains the editing data. QItemDelegate 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.
See also QItemEditorCreatorBase, QStandardItemEditorCreator, QItemEditorFactory, and Color Editor Factory Example.
Constructs an editor creator object using valuePropertyName as the name of the property to be used for editing. The property name is used by QItemDelegate when setting and getting editor data.
Note that the valuePropertyName is only used if the editor widget does not have a user property defined.
Reimplemented from QItemEditorCreatorBase::createWidget().
Reimplemented from QItemEditorCreatorBase::valuePropertyName().
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.