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.
↧