Hello, i have a QTreeWidget and i want to look through all the QTreeWidgetItem housed in my QTreeWidget. Is there a way to know how many QTreeWidget i have in?
Thx
Hello, i have a QTreeWidget and i want to look through all the QTreeWidgetItem housed in my QTreeWidget. Is there a way to know how many QTreeWidget i have in?
Thx
Yes, you need a recursive solution. Search the forums, there are a couple of these solutions around.
http://www.qtcentre.org/forum/f-qt-p...ight=recursive
Last edited by wysota; 22nd December 2007 at 18:37.
I found this one
http://www.qtcentre.org/forum/f-qt-p...data-7575.html
but i have a QTreeWidget not a QTreeWidgetItem so i can't use the childCount() method, i'd like just to know the QTreeWidget size....
thx
The size in what? pixels? Items?
mattia (20th December 2007)
What about using QTreeWidget::findItems()? You could search for "*" and pass wildcard and recursive matching flags. Notice also QTreeWidgetItemIterator in case you want to iterate certain items.
J-P Nurmi
mattia (20th December 2007)
thx, the iterator is just rigth for me
Bookmarks