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. QML ListView nesting GridView, the ScrollBar behavior is not natural
Qt 6.11 is out! See what's new in the release blog

QML ListView nesting GridView, the ScrollBar behavior is not natural

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 383 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.
  • M Offline
    M Offline
    minquan.li
    wrote on last edited by aha_1980
    #1

    I have a requirement about show the Photo gallery group by datetime.
    I use a QML ListView nesting GridView,It looks like:
    1.PNG
    It looks well unit I add a ScrollBar in ListView:

    Scrollbar.vertical : Scrollbar {
        hoverEnabled : true
        active : hovered ||pressed
        orientation : Qt . Vertical
        anchors.top : parent . top
        anchors.right : parent . right
        anchors.bottom : parent , bottom
        contentItem : Rectangle {
            timplicitwidth : 6
            implicitheight : 100
            radius : width / 2
            color : "#0f1c3e"
        }
    }
    

    When I scroll in ListView The scorllbar changed it's size and position on changed the currentItem in ListView.
    1.PNG
    2.PNG

    I don't know why about it,but I found the contentHeight will change to the currentItem height after scroll the listView.
    I want get the actual behavior scroll bar,What need I do?

    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