QLayout: Make contentsMargins a Q_PROPERTY

It replaces the deprecated int margins property, which was a Q_PROPERTY.
This enables Qt for Python users to use property syntax for it.

Task-number: PYSIDE-1019
Change-Id: I958d2ef7f8e2afcc2be490e29d4b11c070569fbd
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Friedemann Kleint 2020-09-14 08:44:42 +02:00
parent fb65b32d76
commit 366564056d
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +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(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint)
public:
enum SizeConstraint {