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

Create the slot - void QSortFilterProxyModel::setFilterRegExp( const QRegExp & regExp )

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.12.0 Beta 1
    • Component/s: Widgets: Itemviews
    • Labels:
      None
    • Commits:
      933df86bbcb96779b26d888a1e08fddbebbfcfe8 (qt/qtbase/5.12)

      Description

      Currently there is only the slot:
      void setFilterRegExp ( const QString & pattern )

      This is restricted because setting this property overwrites the current filterCaseSensitivity.
      It would be nice to have the method taking the QRegExp as a slot instead.

      Workaround:

      class MySortFilterProxyModel: public QSortFilterProxyModel
      {
          Q_OBJECT
      public:
          MySortFilterProxyModel(QWidget *parent = 0)
              : QSortFilterProxyModel(parent)
          {
          }
      
      protected slots:
          void setMyFilterRegExp(const QRegExp &regExp)
          {
              setFilterRegExp(regExp);
          }
      };
      

        Attachments

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

          Activity

            People

            Assignee:
            sgaist Samuel Gaist
            Reporter:
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes