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

Adding items with a Proxy models

XMLWordPrintable

      Subclassing a QSortFilterProxyModel to have more items than the original model is difficult because of the parent-child relationship of the indexes.

      A problem when subclassing QSortFilterProxyModel is that the void* pointer of QModelIndex is opaque. When a subclass add its own QModelIndex to extend the data range, the internalPointer leads to failure when the methods of QSortFilterProxyModel are called.

      A way to avoid this problem would be to have a helper class responsible for handling the mapping between the original model indexes, and the proxy model indexes, and the relations between parent and child. Such a class would make it easier to create subclass of QAbstractProxyModel.

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

            monsen Marius Bugge Monsen
            poulain Benjamin Poulain (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes