summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index bc7ba02bf..e57237dd0 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -1201,6 +1201,21 @@ QActionGroup *QAbstractFormBuilder::createActionGroup(QObject *parent, const QSt
Saves an XML representation of the given \a widget to the
specified \a device in the standard UI file format.
+ \note Unlike when saving a form in Qt Designer, all property values are
+ written. This is because, the state of whether a property value was
+ modified or not isn't stored in the Qt property system. The widget that
+ is being saved, could have been created dynamically, not loaded via
+ \l load(), so in this case the form builder isn't aware of the list of
+ changed properties. Also, there's no generic way to do this for widgets
+ that were created dynamically.
+
+ Therefore, you should remove properties that are not required from your
+ resulting XML files, before loading them. Alternatively, if you already
+ know which properties you want to save when you call this method,
+ you can overload \l computeProperties() and return a filtered list of
+ required properties. Otherwise, unexpected behavior may occur as some
+ of these properties may depend on each other.
+
\sa load()
*/
void QAbstractFormBuilder::save(QIODevice *dev, QWidget *widget)