ScrollView does not correctly scroll a ListView



  • Hi,

    I have the a problem when embedding a ListView into a ScrollView.
    And the ListView has verticalLayoutDirection: ListView.BottomToTop set.

    The ScrollView shows a scrollbar even if the shown list is to short to be scrolled at all.
    Scrolling a short list jumps the list to the top, but is should be displayed at the bottom.
    Resizing the ScrollView makes the list jump back to the bottom where it belongs.

    Here is my example:

    import QtQuick 2.4
    import QtQuick.Controls 1.3
    import QtQuick.Layouts 1.1
    
    Rectangle {
        id: root
        width: 200
        height: 200
        visible: true
    
        ScrollView{
            anchors.fill: parent
            frameVisible: true
            verticalScrollBarPolicy: Qt.ScrollBarAlwaysOn
            horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
    
            ListView{
                model: 10
                boundsBehavior: Flickable.StopAtBounds
                verticalLayoutDirection: ListView.BottomToTop
    
                delegate: Text{
                    text: "This is item " + index
                }
            }
        }
    }
    
    

    I'm using Qt 5.4.1 and the problem was encountered using VS2013 and also Qt Creator 3.3.1(MinGW 32Bit) so it doesn't seam to be compiler related problem.

    Any one knows a fix to this. Or can at least confirm that this is happening so I can hand in a bug report.

    Cheers
    Tobi



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.