ModelEntry QML Type

Utility allowing handy binding to a single row from a model. More...

Import Statement: import QtModelsToolkit .

Properties

Detailed Description

In opposition to accessing model data via methods like ListModel::get or QAbstractItemModel::data, ModelEntry gives ability to conveniently bind to the pointed element.

Property Documentation

available : bool

Determines whether the item is available.


cacheOnRemoval : bool

Determines whether to cache the item when it is removed from the model. If true, the item will be cached and available until another source model is used or the cacheOnRemoval is set to false.


item : any

The item found in the source model


itemRemovedFromModel : bool

Determines whether the item was removed from the model. This flag is only set when cacheOnRemoval is true.


key : string

The key role used to search for the item.


roles : list<string>

Holds the roles of the item.


row : int

The row of the item in the source model, -1 if not available or removed.


sourceModel : any

The source model to get the item from.


value : any

The value role used to cache the item.