Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
-
None
Description
The QtQuick ListModel provides a method get(index) which returns an object which has the ability to write back changes made to it's properties to the model.
This is done by the means of a descendent of QAbstractDynamicMetaObject where the properties are dependent on the roleNames of the model.
As the methods to create those dynamic meta objects are not in the public API (This file is not part of the Qt API. You mean it!) I know of no way to provide a similar method for custom models.
If the role names of the custom model are known before, this would not be a problem, but for ProxyModels where the sourceModel might change at runtime it leads to the problem that there is no easy way of providing such an object.
A way to reliably enable this method would be appreciated. This could be done by adding the required tools to the public API or maybe by providing some sort of QMLProxyModel which adds a convenient QML API to any QAbstract[Item/List]Model