![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QFormBuilder class is used to dynamically construct user interfaces from UI files at run-time. More...
#include <formbuilder.h>
Public Member Functions | |
| QFormBuilder () | |
| Constructs a new form builder. | |
| ~QFormBuilder () override | |
| Destroys the form builder. | |
| QStringList | pluginPaths () const |
| Returns the list of paths the form builder searches for plugins. | |
| void | clearPluginPaths () |
| Clears the list of paths that the form builder uses to search for custom widget plugins. | |
| void | addPluginPath (const QString &pluginPath) |
| Adds a new plugin path specified by pluginPath to the list of paths that will be searched by the form builder when loading a custom widget plugin. | |
| void | setPluginPath (const QStringList &pluginPaths) |
| Sets the list of plugin paths to the list specified by pluginPaths. | |
| QList< QDesignerCustomWidgetInterface * > | customWidgets () const |
| Returns a list of the available plugins. | |
| Public Member Functions inherited from QAbstractFormBuilder | |
| QAbstractFormBuilder () | |
| Constructs a new form builder. | |
| virtual | ~QAbstractFormBuilder () |
| Destroys the form builder. | |
| QDir | workingDirectory () const |
| Returns the current working directory of the form builder. | |
| void | setWorkingDirectory (const QDir &directory) |
| Sets the current working directory of the form builder to the specified directory. | |
| virtual QWidget * | load (QIODevice *dev, QWidget *parentWidget=nullptr) |
| Loads an XML representation of a widget from the given device, and constructs a new widget with the specified parent. | |
| virtual void | save (QIODevice *dev, QWidget *widget) |
| Saves an XML representation of the given widget to the specified device in the standard UI file format. | |
| QString | errorString () const |
| Returns a human-readable description of the last error occurred in load(). | |
Static Protected Member Functions | |
| static QWidget * | widgetByName (QWidget *topLevel, const QString &name) |
| Static Protected Member Functions inherited from QAbstractFormBuilder | |
| static QString | toString (const DomString *str) |
| static DomPropertyHash | propertyMap (const QList< DomProperty * > &properties) |
| static QMetaEnum | toolBarAreaMetaEnum () |
| static const DomResourcePixmap * | domPixmap (const DomProperty *p) |
Additional Inherited Members | |
| Protected Types inherited from QAbstractFormBuilder | |
| using | DomPropertyHash = QHash<QString, DomProperty*> |
| using | IconPaths = std::pair<QString, QString> |
| Protected Attributes inherited from QAbstractFormBuilder | |
| QScopedPointer< QFormBuilderExtra > | d |
The QFormBuilder class is used to dynamically construct user interfaces from UI files at run-time.
\inmodule QtDesigner
The QFormBuilder class provides a mechanism for dynamically creating user interfaces at run-time, based on UI files created with \QD. For example:
By including the user interface in the example's resources (myForm.qrc), we ensure that it will be present when the example is run:
QFormBuilder extends the QAbstractFormBuilder base class with a number of functions that are used to support custom widget plugins:
\list
The QFormBuilder class is typically used by custom components and applications that embed \QD. Standalone applications that need to dynamically generate user interfaces at run-time use the QUiLoader class, found in the QtUiTools module.
Definition at line 25 of file formbuilder.h.
|
default |
Constructs a new form builder.
|
overridedefault |
Destroys the form builder.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 212 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 220 of file formbuilder.cpp.
Adds a new plugin path specified by pluginPath to the list of paths that will be searched by the form builder when loading a custom widget plugin.
Definition at line 351 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 426 of file formbuilder.cpp.
| void QFormBuilder::clearPluginPaths | ( | ) |
Clears the list of paths that the form builder uses to search for custom widget plugins.
Definition at line 338 of file formbuilder.cpp.
Reimplemented from QAbstractFormBuilder.
Definition at line 309 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 317 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 282 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 301 of file formbuilder.cpp.
Reimplemented from QAbstractFormBuilder.
Definition at line 274 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Reimplemented in qdesigner_internal::WidgetBoxResource, and qdesigner_internal::WidgetBoxResource.
Definition at line 86 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 249 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Definition at line 195 of file formbuilder.cpp.
|
overrideprotectedvirtual |
Reimplemented from QAbstractFormBuilder.
Reimplemented in qdesigner_internal::WidgetBoxResource, and qdesigner_internal::WidgetBoxResource.
Definition at line 128 of file formbuilder.cpp.
| QList< QDesignerCustomWidgetInterface * > QFormBuilder::customWidgets | ( | ) | const |
Returns a list of the available plugins.
Definition at line 417 of file formbuilder.cpp.
| QStringList QFormBuilder::pluginPaths | ( | ) | const |
Returns the list of paths the form builder searches for plugins.
Definition at line 327 of file formbuilder.cpp.
| void QFormBuilder::setPluginPath | ( | const QStringList & | pluginPaths | ) |
Sets the list of plugin paths to the list specified by pluginPaths.
Definition at line 362 of file formbuilder.cpp.
|
protectedvirtual |
Definition at line 386 of file formbuilder.cpp.
Definition at line 228 of file formbuilder.cpp.