diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp index bc7ba02bfc1394129fad5cd96fb59d332e3cfa12..e57237dd0b66962b45656b3c78b7d25a19b6d38c 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)