Qt:Документация 4.3.2/qitemeditorcreator
Материал из Wiki.crossplatform.ru
Внимание: Актуальная версия перевода документации находится здесь |
__NOTOC__
Главная · Все классы · Основные классы · Классы по группам · Модули · Функции |
Содержание |
[править] QItemEditorCreator Class Reference
[модуль QtGui ]
The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase. Далее...
#include <QItemEditorCreator>
Inherits QItemEditorCreatorBase.
Класс был добавлен в Qt 4.2.
[править] Открытые функции
- QItemEditorCreator ( const QByteArray & valuePropertyName )
- 2 public functions inherited from QItemEditorCreatorBase
[править] Подробное описание
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.
[править] Описание функций-членов
[править] QItemEditorCreator::QItemEditorCreator ( const QByteArray & valuePropertyName )
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.
Copyright © 2007 Trolltech | Trademarks | Qt 4.3.2
|