From 62e91ebcee4ebd0c675d8e3eca8b03e2eb1e592f Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sun, 12 May 2019 12:26:34 +0200 Subject: [PATCH] missing polish calls added --- src/controls/QskControl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/controls/QskControl.cpp b/src/controls/QskControl.cpp index 7b002389..7664432b 100644 --- a/src/controls/QskControl.cpp +++ b/src/controls/QskControl.cpp @@ -262,6 +262,11 @@ class QskControlPrivate final : public QQuickItemPrivate bool autoFillBackground : 1; bool autoLayoutChildren : 1; + + /* + This one is about calling updateLayout whenever layoutRect() + has changed -> whe should find a better name: TODO + */ bool polishOnResize : 1; bool blockedPolish : 1; @@ -1438,6 +1443,16 @@ bool QskControl::event( QEvent* event ) if ( d_func()->autoLayoutChildren ) resetImplicitSize(); + if ( d_func()->polishOnResize ) + polish(); + + break; + } + case QEvent::ContentsRectChange: + { + if ( d_func()->polishOnResize ) + polish(); + break; } }