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

ListView Inside Taller ScrollView Causes Oversized Vertical Scroll Bar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.0
    • None
    • Windows 10 Home, Windows 7 Professional, 5.6.0 open source install from qt.io, running application (issue not present with qmlscene)
    • iOS/tvOS/watchOS

    Description

      ScrollView vertical scroll bar height is incorrect (too tall, bar overlaps scroll-down button) when it contains a ListView whose content height is less than the height of the ScrollView and verticalScrollBarPolicy is set to Qt.ScrollBarAlwaysOn.

      Image attached, and here's the code:

      import QtQuick 2.6
      import QtQuick.Controls 1.4
      import QtQuick.Window 2.2
      
      Window {
          height: 200
          visible: true
          width: 200
          
          ScrollView {
              anchors.left: parent.left
              anchors.right: parent.right
              anchors.top: parent.top
              height: 100
              verticalScrollBarPolicy: Qt.ScrollBarAlwaysOn
              
              ListView {
                  delegate: Label { text: modelData }
                  model: [ 0, 1, 2, 3, 4 ]
              }
          }
      }
      

      Attachments

        For Gerrit Dashboard: QTBUG-53773
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jbarnier Joe Barnier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes