Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2683

Example needed for QXmlNodeModelIndex/QXmlResultItems

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • Some future release
    • 4.7.1
    • XML: DOM
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            fenglich Frans Englich (closed Nokia identity)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes