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

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

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • 5.12.0 Beta 1
    • None
    • Widgets: Itemviews
    • None
    • 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

            sgaist Samuel Gaist
            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