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

SortFilterProxyModel snippet contains wrong syntax

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.10.0
    • Documentation
    • None

      https://doc.qt.io/qt-6/qml-qtqml-models-sortfilterproxymodel.html

      The first snippet contains wrong syntax. The colons behind the sorter and filter instances are wrong.

      ProcessModel { id: processModel }
      
      SortFilterProxyModel {
          id: sfpm
          model: processModel
          sorters: [
              RoleSorter: {
                  roleName: "user"
                  priority: 0
              },
              RoleSorter: {
                  roleName: "pid"
                  priority: 1
              }
          ]
          filters: [
              FunctionFilter: {
                  component RoleData: QtObject { property qreal cpuUsage }
                  function filter(data: RoleData) : bool {
                      return (data.cpuUsage > 90)
                  }
              }
          ]
      }
      

        For Gerrit Dashboard: QTBUG-141151
        # Subject Branch Project Status CR V

            santhoshkumar Santhosh Kumar Selvaraj
            henning Henning Gründl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change