Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Potential Bug with Layout containing Repeater inside ScrollView with 6.5.3?
Forum Updated to NodeBB v4.3 + New Features

Potential Bug with Layout containing Repeater inside ScrollView with 6.5.3?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 175 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    antiocles
    wrote on last edited by antiocles
    #1

    Just updated a project from 6.3 to latest LTS 6.5.3 and discovered my dynamically added content was no longer sizing the scroll area anymore. Seems maybe unintentional? In my actual application, the model is a true dynamic model and not just a simple repeat, but luckily both exhibit it.

    //item inside a layout, but think it can be anywhere
                Item {
                    Layout.fillWidth: true
                    Layout.fillHeight: true
    
                    ScrollView {
                        id: buttonScrollView
                        anchors.fill: parent
    //uncomment here to function fine on 6.5.3, worked fine in 6.3 and earlier...
                        //contentHeight: assignmentLayout.childrenRect.height
                        //contentWidth: assignmentLayout.childrenRect.width
                       
                        ColumnLayout {
                            id: assignmentLayout
                            width: parent.width
                            Repeater {
                                model: 10
                                 Label {
                                        text: "ABC"
                                       font.pixelSize: 100
                                  }
                            }
                        }
                    }
                }
    

    If you change it to just be 10 static items in the ColumnLayout, works fine. Only when being added by a repeater does the issue show.

    I tested with any layout, and they all behave the same. Can be fixed by adding contentHeight: assignmentLayout.childrenRect.height and similar, but that was not necessary before so not sure which is the intended behavior. Bug I think?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved