c++ - How to change default expand/collapse sub-items in QTreeWidget? -
i tried create simple treeview following code in qt 4.8
qtreewidgetitem *city = new qtreewidgetitem(ui->trvcompetitions); city->settext(0, tr("city")); (new qtreewidgetitem(city))->settext(0, tr("stockholm")); (new qtreewidgetitem(city))->settext(0, tr("helsinki")); (new qtreewidgetitem(city))->settext(0, tr("copenhagen")); qtreewidgetitem *other = new qtreewidgetitem(ui->trvcompetitions); other->settext(0, tr("other")); (new qtreewidgetitem(other))->settext(0, tr("london")); (new qtreewidgetitem(other))->settext(0, tr("tokio")); (new qtreewidgetitem(other))->settext(0, tr("hanoi")); and treeview got

i have read this article , want treeview has expand/collapse sub-items that

how can change treeview this?
thank!
after reading more documents qtreewidget, realized treeview can customized. have modified treeview following this post , result desired.
Comments
Post a Comment