Qt 4.8
Public Functions | Properties | List of all members
QItemEditorCreator< T > Class Template Reference

The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase. More...

#include <qitemeditorfactory.h>

Inheritance diagram for QItemEditorCreator< T >:
QItemEditorCreatorBase

Public Functions

QWidgetcreateWidget (QWidget *parent) const
 Reimplemented Function More...
 
 QItemEditorCreator (const QByteArray &valuePropertyName)
 
QByteArray valuePropertyName () const
 Reimplemented Function More...
 
- Public Functions inherited from QItemEditorCreatorBase
virtual ~QItemEditorCreatorBase ()
 Destroys the editor creator object. More...
 

Properties

QByteArray propertyName
 

Detailed Description

template<class T>
class QItemEditorCreator< T >

The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase.

Since
4.2

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.

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 const QByteArray;

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.

Definition at line 70 of file qitemeditorfactory.h.

Constructors and Destructors

◆ QItemEditorCreator()

template<class T >
Q_INLINE_TEMPLATE QItemEditorCreator< T >::QItemEditorCreator ( const QByteArray valuePropertyName)
inline

Definition at line 97 of file qitemeditorfactory.h.

98  : propertyName(avaluePropertyName) {}

Functions

◆ createWidget()

template<class T>
QWidget * QItemEditorCreator< T >::createWidget ( QWidget parent) const
inlinevirtual

Reimplemented Function

Implements QItemEditorCreatorBase.

Definition at line 74 of file qitemeditorfactory.h.

74 { return new T(parent); }

◆ valuePropertyName()

template<class T>
QByteArray QItemEditorCreator< T >::valuePropertyName ( ) const
inlinevirtual

Reimplemented Function

Implements QItemEditorCreatorBase.

Definition at line 75 of file qitemeditorfactory.h.

Referenced by QItemEditorFactory::QItemEditorFactory().

75 { return propertyName; }

Properties

◆ propertyName

template<class T>
QByteArray QItemEditorCreator< T >::propertyName
private

Definition at line 78 of file qitemeditorfactory.h.


The documentation for this class was generated from the following files: