diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-17 16:34:10 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-13 07:45:45 +0000 |
commit | 121c7721972064105d8f1c1ac7ca001b6bff4491 (patch) | |
tree | 856b38e62939ab1b886f8e9a5485056d5476945f /examples | |
parent | 82caf4124365dd9f55f6877c2104d7934349dd48 (diff) |
Update Qt Designer documentation.
- Document new QUiPlugin module.
- Fix example documentation to reflect the changes in
the qmake variables (QT/CONFIG).
Task-number: QTBUG-44724
Change-Id: Idd85d601295af25d634c3186e993abc7090fe002
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/designer/doc/src/containerextension.qdoc | 22 | ||||
-rw-r--r-- | examples/designer/doc/src/customwidgetplugin.qdoc | 31 | ||||
-rw-r--r-- | examples/designer/doc/src/taskmenuextension.qdoc | 23 | ||||
-rw-r--r-- | examples/designer/doc/src/worldtimeclockplugin.qdoc | 32 |
4 files changed, 33 insertions, 75 deletions
diff --git a/examples/designer/doc/src/containerextension.qdoc b/examples/designer/doc/src/containerextension.qdoc index 4329d90a5..f82e1c042 100644 --- a/examples/designer/doc/src/containerextension.qdoc +++ b/examples/designer/doc/src/containerextension.qdoc @@ -107,24 +107,12 @@ recognized as a plugin by Qt by using the Q_PLUGIN_METADATA() macro to export the relevant widget information. - The \c CONFIG variable contains two values, \c designer and \c - plugin: + The \c CONFIG variable is set to \c plugin, which ensures that \c qmake + considers the custom widget a plugin library. - \list - \li \c designer: Since custom widgets plugins rely on components - supplied with \QD, this value ensures that our plugin links against - \QD's library (\c libQtDesigner.so). - - \li \c plugin: We also need to ensure that \c qmake considers the - custom widget a \e plugin library. - \endlist - - When Qt is configured to build in both debug and release modes, - \QD will be built in release mode. When this occurs, it is - necessary to ensure that plugins are also built in release - mode. For that reason we add a \c debug_and_release value to the - \c CONFIG variable. Otherwise, if a plugin is built in a mode that - is incompatible with \QD, it won't be loaded and installed. + The \c QT variable contains the value \c designer. Since the plugin uses + components supplied with \QD that require linkage, this value ensures + that our plugin links against \QD's library (\c libQtDesigner.so). The header and source files for the widget are declared in the usual way: diff --git a/examples/designer/doc/src/customwidgetplugin.qdoc b/examples/designer/doc/src/customwidgetplugin.qdoc index 84da3c495..2c3c9c6df 100644 --- a/examples/designer/doc/src/customwidgetplugin.qdoc +++ b/examples/designer/doc/src/customwidgetplugin.qdoc @@ -57,27 +57,18 @@ recognized as a plugin by Qt by using the Q_PLUGIN_METADATA() macro to export the relevant widget information. - The \c CONFIG variable contains two values, \c designer and \c - plugin: - \list - - \li \c designer: Since custom widgets plugins rely on components - supplied with \QD, this value ensures that our plugin links - against \QD's library (\c libQtDesigner.so). - - \li \c plugin: We also need to ensure that \c qmake considers the - custom widget a plugin library. - - \endlist - - When Qt is configured to build in both debug and release modes, - \QD will be built in release mode. When this occurs, it is - necessary to ensure that plugins are also built in release - mode. For that reason we add the \c debug_and_release value to the - \c CONFIG variable. Otherwise, if a plugin is built in a mode that - is incompatible with \QD, it won't be loaded and - installed. + The \c CONFIG variable is set to \c plugin, which ensures that \c qmake + considers the custom widget a plugin library. + + The \c QT variable contains the keyword \c uiplugin. This plugin type + provides a factory function for custom widget creation by implementing + the abstract interfaces QDesignerCustomWidgetInterface or + QDesignerCustomWidgetCollectionInterface, suitable for use with + QUiLoader. It does not have a dependency on the \QD libraries. + Plugins accessing other interfaces of \QD to implement container extensions + or other \QD specific functionality follow different rules and are covered + by other examples. The header and source files for the widget are declared in the usual way, and we provide an implementation of the plugin interface so that \QD can diff --git a/examples/designer/doc/src/taskmenuextension.qdoc b/examples/designer/doc/src/taskmenuextension.qdoc index 541e2a3ed..5f223f353 100644 --- a/examples/designer/doc/src/taskmenuextension.qdoc +++ b/examples/designer/doc/src/taskmenuextension.qdoc @@ -108,25 +108,12 @@ recognized as a plugin by Qt by using the Q_PLUGIN_METADATA() macro to export the relevant widget information. - The \c CONFIG variable contains two values, \c designer and \c - plugin: + The \c CONFIG variable is set to \c plugin, which ensures that \c qmake + considers the custom widget a plugin library. - \list - \li \c designer: Since custom widgets plugins rely on components - supplied with \QD, this value ensures that our plugin links against - \QD's library (\c libQtDesigner.so). - - \li \c plugin: We also need to ensure that \c qmake considers the - custom widget a \e plugin library. - \endlist - - When Qt is configured to build in both debug and release modes, - \QD will be built in release mode. When this occurs, it is - necessary to ensure that plugins are also built in release - mode. For that reason we add the \c debug_and_release value to - the \c CONFIG variable. Otherwise, if a plugin is built in a mode - that is incompatible with \QD, it won't be loaded and - installed. + The \c QT variable contains the value \c designer. Since the plugin uses + components supplied with \QD that require linkage, this value ensures + that our plugin links against \QD's library (\c libQtDesigner.so). The header and source files for the widget are declared in the usual way: diff --git a/examples/designer/doc/src/worldtimeclockplugin.qdoc b/examples/designer/doc/src/worldtimeclockplugin.qdoc index bc45a751a..917ab8bda 100644 --- a/examples/designer/doc/src/worldtimeclockplugin.qdoc +++ b/examples/designer/doc/src/worldtimeclockplugin.qdoc @@ -145,26 +145,18 @@ \snippet worldtimeclockplugin/worldtimeclockplugin.pro 0 \snippet worldtimeclockplugin/worldtimeclockplugin.pro 1 - The \c TEMPLATE variable's value make \c qmake create the custom - widget as a library. The \c CONFIG variable contains two values, - \c designer and \c plugin: - - \list - \li \c designer: Since custom widgets plugins rely on components - supplied with \QD, this value ensures that our plugin links against - \QD's library (\c libQtDesigner.so). - - \li \c plugin: We also need to ensure that \c qmake considers the - custom widget a \e plugin library. - \endlist - - When Qt is configured to build in both debug and release modes, - \QD will be built in release mode. When this occurs, it is - necessary to ensure that plugins are also built in release - mode. For that reason you might have to add a \c release value to - your \c CONFIG variable. Otherwise, if a plugin is built in a mode - that is incompatible with \QD, it won't be loaded and - installed. + The \c TEMPLATE variable's value in conjunction with the keyword + \c plugin in the \c CONFIG variable make \c qmake create the custom + widget as a plugin library. + + The \c QT variable contains the keyword \c uiplugin. This plugin type + provides a factory function for custom widget creation by implementing + the abstract interfaces QDesignerCustomWidgetInterface or + QDesignerCustomWidgetCollectionInterface, suitable for use with + QUiLoader. It does not have a dependency on the \QD libraries. + Plugins accessing other interfaces of \QD to implement container extensions + or other \QD specific functionality follow different rules and are covered + by other examples. The header and source files for the widget are declared in the usual way, and in addition we provide an implementation of the |