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

No get function in SortFilterProxyModel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.10
    • None

      In Grecko's API it's implemented like this:

      /*!
          \qmlmethod variant SortFilterProxyModel::get(int row, string roleName)
      
          Return the data for the given \a roleName of the item at \a row in the proxy model. This allows the role data to be read (not modified) from JavaScript.
          This equivalent to calling \c {data(index(row, 0), roleForName(roleName))}.
      */
      QVariant QQmlSortFilterProxyModel::get(int row, const QString& roleName) const
      {
          return data(index(row, 0), roleForName(roleName));
      }
      

      This is more of a convenience function, but one that we should add since it saves a lot of boilerplate calls.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change