|  | Home

# QtAbstractEditorFactoryBase Class Reference

The QtAbstractEditorFactoryBase provides an interface for editor factories. More...

     #include <QtAbstractEditorFactoryBase>

Inherits QObject.

Inherited by QtAbstractEditorFactory.

- List of all members, including inherited members

### Public Functions

- virtual QWidget * createEditor ( QtProperty * property, QWidget * parent ) = 0

- 29 public functions inherited from QObject

### Protected Functions

- QtAbstractEditorFactoryBase ( QObject * parent = 0 )

- 7 protected functions inherited from QObject

### Additional Inherited Members

- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 signal inherited from QObject
- 1 public type inherited from QObject
- 4 static public members inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

The QtAbstractEditorFactoryBase provides an interface for editor factories.

An editor factory is a class that is able to create an editing widget of a specified type (e.g. line edits or comboboxes) for a given QtProperty object, and it is used in conjunction with the QtAbstractPropertyManager and QtAbstractPropertyBrowser classes.

When using a property browser widget, the properties are created and managed by implementations of the QtAbstractPropertyManager class. To ensure that the properties' values will be displayed using suitable editing widgets, the managers are associated with objects of QtAbstractEditorFactory subclasses. The property browser will use these associations to determine which factories it should use to create the preferred editing widgets.

Typically, an editor factory is created by subclassing the QtAbstractEditorFactory template class which inherits QtAbstractEditorFactoryBase. But note that several ready-made implementations are available:

- QtCheckBoxFactory
- QtDateEditFactory
- QtDateTimeEditFactory
- QtDoubleSpinBoxFactory
- QtEnumEditorFactory
- QtLineEditFactory
- QtScrollBarFactory
- QtSliderFactory
- QtSpinBoxFactory
- QtTimeEditFactory
- QtVariantEditorFactory

See also QtAbstractPropertyManager and QtAbstractPropertyBrowser.

## Member Function Documentation

### QtAbstractEditorFactoryBase::QtAbstractEditorFactoryBase ( QObject * parent = 0 ) `[protected]`

Creates an abstract editor factory with the given parent.

### QWidget * QtAbstractEditorFactoryBase::createEditor ( QtProperty * property, QWidget * parent ) `[pure virtual]`

Creates an editing widget (with the given parent) for the given property.

This function is reimplemented in QtAbstractEditorFactory template class which also provides a pure virtual convenience overload of this function enabling access to the property's manager.

See also QtAbstractEditorFactory::createEditor().