Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SLOVED]how to achieve the friendTree by other ways
Qt 6.11 is out! See what's new in the release blog

[SLOVED]how to achieve the friendTree by other ways

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 559 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hk520590
    wrote on last edited by
    #1

    !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!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved