I've been struggling for about an hour trying to figure out how to correctly use findItem to find an item in a heirarchical QStandardItemModel. The item is in column 2, so I set the column and I told it to search recursively (also tried MatchWrap too), and yet it returns nothing. I'm thinking this has something to do with the fact that only the first column in my table knows about the hierarchy, as you append rows to an item to create a hierarchical pattern, not the entire row. I told it also to search collumn 0 since that is the collumn that the hierarchy is built up in, but that failed, as expected, because I'm sure it did a search down just all the items in column 0.
So now I don't know what to try. How am I ever supposed to search for an item that isn't in the first collumn or at the top level of the hierarchy? Is there a better way I can build my QStandardItemModel such that it supports what I want to do? It currently is being displayed in a QTreeView, and looks great, but behind the scenes I need to be able to search the model.
Suggestions?
Bookmarks