Important: Please read the Qt Code of Conduct -

Example of match(....) function over-ridden of QAbstractItemModel

  • Hello forum,

    I need to highlight a hierarchical tree item based to user input and string pattern matching of the entered input. I was suggested to look into this match(...) function.

    But i could not figure out how to over-ride the function . If anyone in the forum have already done something similar of what am trying to, she/he is earnestly requested to share the reference example information with me.



  • You usually do not need to override the method. Just feed it with the appropriate arguments (the string to search for, the role to check the data against, where to start, case insensitivity and so on).

Log in to reply