-
Bug
-
Resolution: Done
-
P2: Important
-
1.1.0
-
None
-
All platforms
Component: plugins/declarative/gallery
For more advanced usages of the GalleryQueryModel a count -property and a get -function (or getProperty -functoin) would be needed.
Find attached a patch that implements these in one way.
An alternative would be to provide some kind of iterator to the result set. The usual pattern is that one wants to iterate through the results and create an own model for ListView or PathView combining the results of two queries or one query and some own data.
An example of a need is that currently with tracker the artist of an Album query is always empty. One can do an own 'algorithm' to find out the artist of an album by querying all the songs and creating a model in Java Script of albums and their artists. This is not currently easily doable in QML without the ability to iterate through the results of GalleryQueryModel.