Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error with customsortfiltermodel example
Forum Updated to NodeBB v4.3 + New Features

Error with customsortfiltermodel example

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 422 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Panoss
    wrote on last edited by Panoss
    #1

    I 'm trying to run the customsortfiltermodel example.
    But I get the error: filterwidget.h:5:10: error: 'QRegExp' file not found
    How can I fix it?

    (Qt Creator 6.0.2)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you using Qt 6 ?
      QRegExp has been deprecated in Qt 5 and removed in Qt 6, so if the example has not changed then it was missed during the porting to QRegularExpression.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P Christian EhrlicherC 2 Replies Last reply
      1
      • SGaistS SGaist

        Hi,

        Are you using Qt 6 ?
        QRegExp has been deprecated in Qt 5 and removed in Qt 6, so if the example has not changed then it was missed during the porting to QRegularExpression.

        P Offline
        P Offline
        Panoss
        wrote on last edited by Panoss
        #3

        Hi @SGaist.
        I have Qt Creator 6.0.2
        Based on Qt 6.2.2 (MSVC 2019, 64 bit)

        What can I do?

        SGaistS 1 Reply Last reply
        0
        • P Panoss

          Hi @SGaist.
          I have Qt Creator 6.0.2
          Based on Qt 6.2.2 (MSVC 2019, 64 bit)

          What can I do?

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #4

          @Panoss said in Error with customsortfiltermodel example:

          @SGaist Qt Creator 6.0.2
          Based on Qt 6.2.2 (MSVC 2019, 64 bit)

          What can I do?

          This is your Qt Creator information not the Kit you are currently using.

          You can open a bug report against the documentation on the bug report system.

          As for your use case, adapt the code to use QRegularExpression.

          [edit: wrong example link used SGaist]

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Are you using Qt 6 ?
            QRegExp has been deprecated in Qt 5 and removed in Qt 6, so if the example has not changed then it was missed during the porting to QRegularExpression.

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @SGaist said in Error with customsortfiltermodel example:

            so if the example has not changed then it was missed during the porting to QRegularExpression.

            No, just the link is wrong - here the one for Qt6: https://doc.qt.io/qt-6/qtwidgets-itemviews-customsortfiltermodel-example.html

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            P 1 Reply Last reply
            1
            • Christian EhrlicherC Christian Ehrlicher

              @SGaist said in Error with customsortfiltermodel example:

              so if the example has not changed then it was missed during the porting to QRegularExpression.

              No, just the link is wrong - here the one for Qt6: https://doc.qt.io/qt-6/qtwidgets-itemviews-customsortfiltermodel-example.html

              P Offline
              P Offline
              Panoss
              wrote on last edited by
              #6

              @Christian-Ehrlicher it works!
              Thank you guys!

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved