[SLOVED]how to achieve the friendTree by other ways
-
!http://www.qtcn.org/bbs/attachment/Mon_1312/26_124672_d670aba792d555a.jpg(friendtree)!
It's using qtreewidget and QWidget!
the code is:
@ QTreeWidgetItem *item1 = new QTreeWidgetItem;
ui->friendTree->topLevelItem(0)->addChild(item1);
tem->init(bareJid,str,image);
ui->friendTree->setItemWidget(item1,0,tem);
image.save(name);@
the "tem" is Qwidget!
how to use the model and qtreeview achieve this result!
because I can get “tem” username when I double clieck the item!