Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75918

ListView's ScrollBar handle size changes with varying item height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.11.3, 5.12.3, 5.13.0 Beta3
    • Quick: Controls 2
    • None
    • All

      The handle size of the ScrollBar changes when the items have varying height:

       

      import QtQuick 2.11
      import QtQuick.Controls 2.4
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Scroll")
      
          ListView {
              anchors.fill: parent
              model: 20
              delegate: ItemDelegate {
                  width: parent.width
                  height: lbl.height
      
                  Label {
                      id: lbl
                      width: parent.width
                      text: {
                          var str = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.";
      
                          var res = str;
                          for (var i=0; i<index; i++) {
                              res += str;
                          }
                          return res;
                      }
                      wrapMode: Text.WordWrap
                  }
              }
      
              ScrollBar.vertical: ScrollBar {}
          }
      }
      
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            DanielSt Peter Staab
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes