Qt. QTreeWidget. How to hide dotted lines?
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; }"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With