CategoryModelThe CategoryModel element provides a model of the categories supported by a Plugin. More... Inherits QtObject This type was introduced in Qt Location 5.0. Properties
Detailed DescriptionThe CategoryModel element provides a model of the categories that are available from the current Plugin. The model supports both a flat list of categories and a hierarchical tree representing category groupings. This can be controlled by the hierarchical property. The model supports the following roles:
The following example displays a flat list of all available categories: import QtQuick 2.0 import QtLocation 5.0 ListView { model: CategoryModel { plugin: myPlugin hierarchical: false } delegate: Text { text: category.name } } To access the hierarchical category model it is necessary to use a VisualDataModel to access the child items. Property DocumentationThis read-only property holds the textual presentation of latest category model error. If no error has occurred, an empty string is returned. An empty string may also be returned if an error occurred which has no associated textual representation. This property holds whether the model provides a hierarchical tree of categories or a flat list. The default is true. This read-only property holds the current status of the model.
|