Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide dotted lines in QTreeWidget

Qt. QTreeWidget. How to hide dotted lines?

like image 702
TopicStarter Avatar asked Jan 13 '11 06:01

TopicStarter


2 Answers

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);
like image 190
Tomek Avatar answered Sep 23 '22 20:09

Tomek


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; }"));
like image 20
Fred Avatar answered Sep 23 '22 20:09

Fred