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

Include documentation on how to implement the QAbstractItemModel::sort function when subclassing

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None
    • All

    Description

      Hi.

       

      The documentation of QAbstractItemModel::sort, as well as the mvp programming guide, indicate that users can (and should) implement the `sort` method when subclassing QAbstractItemModel.

       

      However nowhere does the documentation describe how the function has to be implemented, and no one on the internet seems to know (I've just spent several hours looking). While the standard approach seems to use a QSortFilterProxyModel instead, there are cases in which it's necessary to implement the sort method directly.

       

      Would it be possible to add a description (or at least an example) on how to do so?

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            ldorigo Luca Dorigo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes