summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qlayout.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-04-21 15:25:49 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-04-21 22:13:11 +0200
commit284d4e71258ad3afeda6d5bb83eb50e25137824c (patch)
treedf3534ab91edd9f0c947c86d767d37e1f2f59633 /src/widgets/kernel/qlayout.h
parent1a65a4faf52f83ba3fbbba88cea1c4bb800e8de7 (diff)
QLayout: mark unsetContentsMargins as the RESET function
contentsMargins is a Q_PROPERTY on a QLayout. Qt 6.1 introduced QLayout::unsetContentsMargins() to reset the contents margins to the "default" ones (that the user can't know); that's the textbook description of a RESET function for the property. Add some tests also for unsetContentsMargins. [ChangeLog][QtWidgets][QLayout] The unsetContentsMargins() function now acts as the RESET function for the contentsMargins property. Change-Id: I463d88363c11f4a15ad3d6af71401d8698de1d41 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/kernel/qlayout.h')
-rw-r--r--src/widgets/kernel/qlayout.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h
index 4686a999a5..5fd2aa2d63 100644
--- a/src/widgets/kernel/qlayout.h
+++ b/src/widgets/kernel/qlayout.h
@@ -64,7 +64,7 @@ class Q_WIDGETS_EXPORT QLayout : public QObject, public QLayoutItem
Q_DECLARE_PRIVATE(QLayout)
Q_PROPERTY(int spacing READ spacing WRITE setSpacing)
- Q_PROPERTY(QMargins contentsMargins READ contentsMargins WRITE setContentsMargins)
+ Q_PROPERTY(QMargins contentsMargins READ contentsMargins WRITE setContentsMargins RESET unsetContentsMargins)
Q_PROPERTY(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint)
public:
enum SizeConstraint {