MovableModel QML Type

Proxy model allowing freely reorder rows without modifying the source model. More...

Import Statement: import QtModelsToolkit .

Properties

Methods

Detailed Description

Property Documentation

synced : bool

This read-only properties specifies if the rows order of the proxy is synced with the rows order of the source model. When true, rows moves of the source model are directly reflected in the proxy model.

Synced property becomes false when move or desyncOrder are called.


Method Documentation

void desyncOrder()

Explicitly desynchronize order. It means that reorders within source model won't be reflected in the proxy.


void move(from, to, count)

Moves rows in the same way as ListModel::move.


list<int> order()

Returns list where every entry indicates position of given index of a proxy in a source model.


void syncOrder()

Restores the order of the source in a proxy and marks the proxy as synced.