QTreeWidget::findItems only searches top level items ?
if I have a QTreeWidget like this one:
"Base"
+-"child1"
+-"child2"
and I use QTreeWidget->findItems ( QString ( "child" ), Qt::MatchContains )
it will return an empty list. If I search for "ba" in the same tree it correctly returns a list with one item (the "Base" item).
if I put more than the "Base" item to the same level I also can search for it... but no childs.
is this behavior right or did I use findItems wrong ?
Re: QTreeWidget::findItems only searches top level items ?
Try using the combination of "Qt::MatchContains | Qt::MatchRecursive" as flags.
Re: QTreeWidget::findItems only searches top level items ?
thanks worked :) didn't see the flag and wondered an hour ...
Re: QTreeWidget::findItems only searches top level items ?
Add Qt::MatchRecursive Flag