Skip to content
Snippets Groups Projects

qml: widgets: handling the header size changing in ExpandGridView fixed

Open Aleksey Kuznetsov requested to merge expand_grid_view_fix into master

Header size in the view were fixed on creating the view and this value were used for calculating the items positions. If the header changes its size the view did not take this into account. Handing the header item size changing added with forcing the layout updating.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • patch LGTM, though, I suggest theses changes. headerHeight is already binded to headerItemLoader.implicitHeight

    diff --git a/modules/gui/qt/widgets/qml/ExpandGridView.qml b/modules/gui/qt/widgets/qml/ExpandGridView.qml
    index 02d41419b4..24ca2f0dd1 100644
    --- a/modules/gui/qt/widgets/qml/ExpandGridView.qml
    +++ b/modules/gui/qt/widgets/qml/ExpandGridView.qml
    @@ -72,7 +72,7 @@ NavigableFocusScope {
         property alias expandItem: expandItemLoader.item
     
         property Component headerDelegate: Item{}
    -    property int headerHeight: headerItemLoader.implicitHeight
    +    property alias headerHeight: headerItemLoader.implicitHeight
         property alias headerItem: headerItemLoader.item
     
         property alias footerItem: footerItemLoader.item
    @@ -369,7 +369,6 @@ NavigableFocusScope {
             Connections {
                 target: headerItemLoader
                 onHeightChanged: {
    -                headerHeight = headerItemLoader.implicitHeight
                     flickable.layout(true)
                 }
             }
  • Aleksey Kuznetsov added 39 commits

    added 39 commits

    • 05509df4...423a7851 - 38 commits from branch master
    • 36059b1b - qml: widgets: handling the header size changing in ExpandGridView fixed

    Compare with previous version

  • Aleksey Kuznetsov added 14 commits

    added 14 commits

    • 36059b1b...dcb8bc8a - 13 commits from branch master
    • 4bd4d1b6 - qml: widgets: handling the header size changing in ExpandGridView fixed

    Compare with previous version

Please register or sign in to reply
Loading