Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
I'm writing the multi-page PDF viewer for QtPDF. It was natural to get started using ListView to arrange pages vertically and be able to flick through them; so each delegate is one page from the PDF. Next, I want to add horizontal scrolling. The natural thing is to put the whole ListView into a horizontal-scrolling Flickable. What should its contentWidth be? Different pages can be different sizes. So I need the horizontal Flickable's contentWidth to be the max of the widths of all delegates (pages) that are currently visible (or currently instantiated? or all delegates ever seen?) in the ListView. So it seems natural that implicitWidth of the ListView should provide some sort of maximum width like that: either the current maximum or the all-time maximum. (maybe configure the calculation method with another property?) Then I could just bind width: implicitWidth. I don't want to do any QML hack-arounds to iterate delegates myself and find this out.
Since this isn't there, I will try to switch to TableView, because it already knows how to do horizontal scrolling. But it can't be the first time someone has wanted to do this with ListView.
Attachments
Issue Links
- is duplicated by
-
QTBUG-85747 ListView cannot be scrolled horizontally
- Closed
-
QTBUG-84120 ListView cannot be scrolled horizontally.
- Closed
- is required for
-
QTBUG-73063 Qt Quick Changes in Qt 6
- Open
- relates to
-
QTBUG-45607 QML Listview contentWidth always -1
- Closed