I would like to have QML GridView
with at the end of it a special element to add new items. So when the grid reflows that special element at the end reflows exactly like normal elements. I had it coded with a Flow
, with inside a Repeater and after it, that special element and it worked great, but I can't get scrollbars with a Flow, so I moved to a GridView.
I tried the footer
property of the GridView, but the footer appears under the grid, while I want it on the last row of the grid besides the other items.
To make it clear here is what I want:
[item1] [item2] [item3]
[item4] [ ADD ]
Also, the special element must have a different display an different action on click.
I would like the C++ side not to be aware of that special behaviour. If I must add an item at the end of the model, I would like it add it within the QML so that I don't taint the C++ with that implementation detail.
I tried this:
model: projects.push({name: '+'})
and also various types of append
, but that didn't work.