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. Difference between MatchFlag.MatchFixedString and MatchFlag.MatchExactly
Forum Updated to NodeBB v4.3 + New Features

Difference between MatchFlag.MatchFixedString and MatchFlag.MatchExactly

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 475 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.
  • B Offline
    B Offline
    buhtz
    wrote on last edited by
    #1

    I try to get the difference in the behavior between MatchFlag.MatchFixedString and MatchFlag.MatchExactly.

    To my understanding it is the same behavior. Isn't it?

    JonBJ 1 Reply Last reply
    0
    • B buhtz

      I try to get the difference in the behavior between MatchFlag.MatchFixedString and MatchFlag.MatchExactly.

      To my understanding it is the same behavior. Isn't it?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @buhtz
      https://doc.qt.io/qt-6/qt.html#MatchFlag-enum where these constants are described does not make it totally clear, but this type is used:

      • In model item searches, such as QModelIndexList QAbstractItemModel::match(const QModelIndex &start, int role, const QVariant &value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const.

      I think the MatchFlag.MatchExactly ("Performs QVariant-based matching.") should allow e.g. integer model data values (models store QVariants) to be compared via their actual underlying value type rather then being converted to strings, as the other constants call for.

      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