[Qt-interest] How do get the item values from tree Widget
Duane Hebert
spoo at flarn.com
Mon Jun 22 15:24:17 CEST 2009
> How do the item values from tree widget..
>For Example i have 10 items in my tree widget..
>Void MainWindow::getItem(QString uri)
>{
>for(int i =0;i<10; i++)
>{
> QTreeWidgetItem *item;
//item = // i have to check the items uri one by one
//}
You can use the TreeWidget's QTreeWidgetItem * topLevelItem ( int index ) const
and int topLevelItemCount () const
functions to parse each top level item and then the TreeWidgetItem's
QTreeWidgetItem * child ( int index ) const and
int childCount () const
functions to parse that for the children.
More information about the Qt-interest-old
mailing list