Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.14.1, 5.14.2
-
None
-
Linux Gentoo x86_64
Description
Using QtQuick.Controls 2.0 I am not able to get a horizontal scrollbar for a ListView working.
I have verified this by using the projects and examples included in QTBUG-52553 ('GridView_ScrollBar.tar.gz' and an implementation of the not working version).
I have attached 'GridView_ScrollBar.tar.gz'.
import QtQuick 2.7 import QtQuick.Controls 2.0 ApplicationWindow { visible: true width: 640 height: 480 Rectangle { width: 400; height: 300; GridView { id: list; width: parent.width height: parent.height contentWidth: parent.width * 4 contentHeight: parent.width * 4 model: 20; clip : true flickableDirection: Flickable.HorizontalAndVerticalFlick delegate: Rectangle { height: 50; width: parent.width; color: (model.index %2 === 0 ? "darkgray" : "lightgray"); } ScrollBar.vertical: ScrollBar{ contentItem: Rectangle { implicitWidth: 6 implicitHeight: 100 radius: width / 2 color: "black" }} ScrollBar.horizontal: ScrollBar{contentItem: Rectangle { implicitWidth: 100 implicitHeight: 6 radius: width / 2 color: "black" }} } } Component.onCompleted: { console.log("WIdth : "+list.width + "ContentWidth : "+list.contentWidth); console.log("Height :"+list.height + "COntentHeight : "+list.contentHeight) console.log( "Width Ratio : "+ list.visibleArea.widthRatio); console.log("Height Ratio : "+list.visibleArea.heightRatio); } }
Attachments
Issue Links
- duplicates
-
QTBUG-82290 ListView should set implicitWidth to the max of its delegates' widths
- Reported