How to hide dotted lines in QTreeWidget
Qt. QTreeWidget. How to hide dotted li开发者_StackOverflownes?
If this indeed is about the branches (the question is not very clear), then QTreeView (and thus QTreeWidget) has a special function to do just that (since Qt 4.2):
treeWidget->setRootIsDecorated(false);
If you're talking about the branch lines on the left of the tree, try setting a stylesheet as such :
treeWidget->setStyleSheet(QString("QTreeView::branch { border-image: none; }"));
What about
treeWidget->setRowHidden(rowNumber,QModelIndex(),true);
Try strecthing the header with;
treeWidget->header()->setStretchLastSection(true);
精彩评论