遍历QTreeWidget

转自:https://blog.csdn.net/qiangzi4646/article/details/80244433

 1     //ui 文件中定义
 2     //QTreeWidget *treeWidget;
 3     //...
 4 
 5     //遍历treeWidget
 6     QTreeWidgetItemIterator it(ui.treeWidget);
 7     while (*it) {
 8          //do something like
 9          (*it)->text(0);
10         ++it;
11     }

 

posted @ 2020-06-18 09:27  阳光下的小土豆  阅读(1460)  评论(0编辑  收藏  举报