Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
4.7.1
-
None
Description
Related to task 224841, it would be useful to have an example that make use of custom nodes through QXmlNodeModelIndex/QXmlResultItems. Maybe that the result of a query is sent into a QAbstractModelIndex, and subsequently shown in a view?
That is, an example which:
1. Has a custom node backend(subclass of QAbstractXmlNodeModel). For instance, the QObjectXmlNodeModel class from examples/xmlpatterns/qobjectxmlmodel is reused
2. A query queries it
3. The output is sent to QXmlResultItems using QXmlQuery::evaluateTo(QXmlResultItems *)
4. The items is retrieved, QXmlItem::toNodeModelIndex() is called on each
5. the node indexes are converted to QObjecT * by calling QXmlNodeModelIndex::internalPointer(), and inserted into a QAbstractItemModel sub-class, and shown in a tree view, for instance.
This would be code that potentially could be turned into a public library class.