summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-29 08:20:14 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2019-10-29 13:52:08 +0100
commite75afb9ab5746b97cb2d9f1538f7fd9ec943bb10 (patch)
treee39bf504591c0b3f84dcbff5514e843234b3e9c8
parenta339e4a1e3b53d852c1e6a445e3159dbd8bc0e80 (diff)
QAbstractFormBuilder::save(): Add a note explaining property issues
State that the resulting files are not intended to be used without editing. Change-Id: I5ae342907a9394427ef9d3471ff2670421da8cc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
-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)