I have a QTreeWidget
that items append to it dynamically, I want to set lines between them, I have first pictures and I want it to be like the second one, but I don't know how doing it?
thank you in advance!
Well you can experiment with stylesheets:
treeWidget->setStyleSheet("QTreeWidget::item { border-bottom: 1px solid black;}");
But I am not sure if can get exactly the look you want. You can also subclass QStyledItemDelegate and provide your own sizeHint()
and paint()
implementations.
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