From 1571b1f59a9d939dc4fe2bd1f6dfe4a58b1bb3bf Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sun, 15 Sep 2019 19:48:18 +0200 Subject: [PATCH] handling of spacings fixed --- src/layouts/QskGridLayoutEngine.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/layouts/QskGridLayoutEngine.cpp b/src/layouts/QskGridLayoutEngine.cpp index 888510e1..59c62e2c 100644 --- a/src/layouts/QskGridLayoutEngine.cpp +++ b/src/layouts/QskGridLayoutEngine.cpp @@ -249,14 +249,22 @@ bool Element::isIgnored() const QskLayoutChain::CellData Element::cell( Qt::Orientation orientation ) const { - const auto policy = qskSizePolicy( m_item ).policy( orientation ); - QskLayoutChain::CellData cell; cell.isValid = true; - cell.canGrow = policy & QskSizePolicy::GrowFlag; + + if ( m_isSpacer ) + { + // ??? + } + else + { + const auto policy = qskSizePolicy( m_item ).policy( orientation ); - if ( policy & QskSizePolicy::ExpandFlag ) - cell.stretch = 1; + cell.canGrow = policy & QskSizePolicy::GrowFlag; + + if ( policy & QskSizePolicy::ExpandFlag ) + cell.stretch = 1; + } return cell; }