怎样创建一个tree控件,子层不缩进,就想qq那样?
------解决方案--------------------
- C/C++ code
QTreeWidgetItem* __qtreewidgetitem = new QTreeWidgetItem(); __qtreewidgetitem->setText(0, "Name"); ui->treeWidget->setHeaderItem(__qtreewidgetitem); ui->treeWidget->setColumnCount(2); QTreeWidgetItem* rootFriends = new QTreeWidgetItem(ui->treeWidget); rootFriends->setText(0, "My Friends"); QTreeWidgetItem* rootBlocked = new QTreeWidgetItem(ui->treeWidget); rootBlocked ->setText(0, Blocked List"); QTreeWidgetItem* friend = new QTreeWidgetItem(rootFriends); friend ->setText(0, "Friend 1"); QTreeWidgetItem* badguy = new QTreeWidgetItem(rootBlocked); badguy ->setText(0, "Bad Guy 1");
------解决方案--------------------
想要不缩进的话,使用 QToolBox 吧
------解决方案--------------------
http://www.qtcn.org/bbs/read-htm-tid-45510.html
不知道有啥想法没