
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQItemEditorCreator class makes it possible to create item editor creator bases without subclassingQItemEditorCreatorBase.More...
| Header: | #include <QItemEditorCreator> |
| Since: | Qt 4.2 |
| Inherits: | QItemEditorCreatorBase |
| QItemEditorCreator(const QByteArray & valuePropertyName) |
| virtual QWidget * | createWidget(QWidget * parent) const |
| virtual QByteArray | valuePropertyName() const |
TheQItemEditorCreator class makes it possible to create item editor creator bases without subclassingQItemEditorCreatorBase.
QItemEditorCreator is a convenience template class. It uses the template class to create editors forQItemEditorFactory. This way, it is not necessary to subclassQItemEditorCreatorBase.
QItemEditorCreator<MyEditor>*itemCreator=newQItemEditorCreator<MyEditor>("myProperty");QItemEditorFactory*factory=newQItemEditorFactory;
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 theQ_PROPERTY macro). If the widget has a user property, you should useQStandardItemEditorCreator instead.
See alsoQItemEditorCreatorBase,QStandardItemEditorCreator,QItemEditorFactory, andColor Editor Factory Example.
Constructs an editor creator object usingvaluePropertyName as the name of the property to be used for editing. The property name is used byQItemDelegate when setting and getting editor data.
Note that thevaluePropertyName is only used if the editor widget does not have a user property defined.
[virtual]QWidget * QItemEditorCreator::createWidget(QWidget * parent) constReimplemented fromQItemEditorCreatorBase::createWidget().
[virtual]QByteArray QItemEditorCreator::valuePropertyName() constReimplemented fromQItemEditorCreatorBase::valuePropertyName().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.