|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QAbstractFormBuilder Class Reference
[QtDesigner module]

The QAbstractFormBuilder class provides a default implementation for classes that create user interfaces at run-time. More...

    #include <QAbstractFormBuilder>

Inherited by QFormBuilder.

- List of all members, including inherited members

### Public Functions

- QAbstractFormBuilder ()
- virtual ~QAbstractFormBuilder ()
- virtual QWidget * load ( QIODevice * device, QWidget * parent = 0 )
- virtual void save ( QIODevice * device, QWidget * widget )
- void setWorkingDirectory ( const QDir & directory )
- QDir workingDirectory () const

## Detailed Description

The QAbstractFormBuilder class provides a default implementation for classes that create user interfaces at run-time.

QAbstractFormBuilder provides a standard interface and a default implementation for constructing forms from user interface files. It is not intended to be instantiated directly. Use the QFormBuilder class to create user interfaces from `.ui` files at run-time.

To override certain aspects of the form builder's behavior, subclass QAbstractFormBuilder and reimplement the relevant virtual functions:

- load() handles reading of `.ui` format files from arbitrary QIODevices, and construction of widgets from the XML data they contain.
- save() handles saving of widget details in `.ui` format to arbitrary QIODevices.
- workingDirectory() and setWorkingDirectory() control the directory in which forms are held. The form builder looks for other resources on paths relative to this directory.

See also QFormBuilder.

## Member Function Documentation

### QAbstractFormBuilder::QAbstractFormBuilder ()

Constructs a new form builder.

### QAbstractFormBuilder::~QAbstractFormBuilder () `[virtual]`

Destroys the form builder.

### QWidget * QAbstractFormBuilder::load ( QIODevice * device, QWidget * parent = 0 ) `[virtual]`

Loads an XML representation of a widget from the given device, and constructs a new widget with the specified parent.

See also save().

### void QAbstractFormBuilder::save ( QIODevice * device, QWidget * widget ) `[virtual]`

Saves an XML representation of the given widget to the specified device in the standard `.ui` file format.

See also load().

### void QAbstractFormBuilder::setWorkingDirectory ( const QDir & directory )

Sets the current working directory of the form builder to the directory specified.

See also workingDirectory().

### QDir QAbstractFormBuilder::workingDirectory () const

Returns the current working directory of the form builder.

See also setWorkingDirectory().