P
P
Pavel K2015-06-02 02:40:14
Qt
Pavel K, 2015-06-02 02:40:14

How to move rows in a ListView (QML) so that the model knows about it?

Greetings!
There is a model based on QAbstractItemModel,
the moveRows function is of course registered,
there is a view in qml based on ListView.
You need to move a couple of lines.
In the listView, there were no methods on this topic, okay,
but it didn’t turn out to be the same in the methods available for qml, I
saw the same O_O in the examples - they work with the ListModel and through items.move, but there are no such functions in QAbstractItemModel , as well as not directly moveRows.
Tell me, please, how to do it all the same beautifully?
Well, do not write this function again in the model only for qml, when there is moveRows?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question