Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Invert ListView without filling the ListView from the bottom

$
0
0
I want a ListView to invert the order of its items, so that the most recent item is at the top. I tried to achieve this using verticalLayoutDirection: ListView.BottomToTop, but it makes the ListView fill up from the bottom (as to be expected, I guess). Here’s the code: ListView {     id: theList       anchors     {         left: parent.left         top: theAboveList.bottom         right: parent.right         bottom: parent.bottom     }       model: theModel     delegate: theDelegate {}     verticalLayoutDirection: ListView.BottomToTop     clip: true } Sorry, the stupid forum software won’t let me post a screenshot, becaus it thinks URL == spam. Congrats on that strike of genius. How can I invert the ListView’s item order and still have it fill from top to bottom? The cleaner, the better.

Viewing all articles
Browse latest Browse all 4972

Trending Articles