Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ScrollView with Repeater
Qt 6.12 LTS is out! See what's new in the release blog

ScrollView with Repeater

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 854 Views 1 Watching
  • 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.
  • freddy311082F Offline
    freddy311082F Offline
    freddy311082
    wrote on last edited by
    #1

    Hi Guys

    I'm trying to do use Repeater width ScrollView but nothing happen. This is my code:

    Item{
        width: parent.width
        height: parent.height
    
    
        ScrollView{
            contentItem: Item {
                id: name
                anchors.fill: parent
                Row{
                    id: row
                    height: parent.height
                    width: parent.width
                    spacing: 2
                    Repeater{
                        model: ListModel{
                            ListElement{
                                ecolor: "green"
                            }
                            ListElement{
                                ecolor:"red"
                            }
                            ListElement{
                                ecolor:"yellow"
                            }
                            ListElement{
                                ecolor:"blue"
                            }
                        }
    
                        delegate: ImageComponent{
                            itemColor: ecolor
                            width: 100
                            height: row.height
                        }
                    }
                }
            }
    
            anchors.fill: parent
        }
    }
    
    

    this is a peace of my code. If I put out of the ScrollView the item which is in binding with the contentItem property, The component draw correctly, but not when I use the ScrollView.

    What is wrong there ??

    regards

    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
    • Unsolved