It's a fairly common practice to use flexible headers for lists, this will add a
header that has the implicitHeight by default and will fold it to largeSpacing
once it's scrolled, while keeping the header visible.
Details
Diff Detail
- Repository
- R169 Kirigami
- Branch
- arcpatch-D4599
- Lint
No Linters Available - Unit
No Unit Test Coverage
i get only a white empty area where the headers should be?
examples/gallery/contents/ui/gallery/ListViewGallery.qml | ||
---|---|---|
21 | we can depend only from Qt 5.7, so would be import QtQuick.Controls 2.0 |
that's what i get with it: a reserved space, always blank in every page, it was clearly not tested enough.
I don't think is the right way to go about it, i wonder how much is possible to (ab)use the regular header property for pages
stock ListView already has some api to control its own header.
by default it scrolls away, otherwise it can be either fixed or being an hybrid on scrolling away and fixed title ListView.PullBackHeader (the one actually interesting i think, but different apps will need different ones)
https://paste.kde.org/phss79wpo has a behavior very near to this patch, but flicking and scrollbar don't get the erratic behavior they get when you change the actual flickable geometry during drag of either the view directly or the scrollbar.
This without needing additional patches to kirigami. it has a problem of the pull down to refresh breaking, but that should be separately fixed.
i would go that route: put the attached diff in the exampes and fix separately the pull down to refresh
Yep, headerPositioning: ListView.OverlayHeader was what I was looking for, thanks a lot for the hint!