QTreeWidget stylesheet - items padding
-
I found a couple of options on the forums, but I still have not achieved that the content of the items and the header were aligned relative to the edge, say by 20 pixels, is it possible to do this through a stylesheet? I use qt 5.15.2 x32 on windows.
First column looks nice, bat other without padding. -
@JoeCFD it certainly works, but not exactly how I want, i set padding-left: 20px, but first column has 40px;
maybe "branch" affects?
QTreeWidget { font-size: 12px; border: none; } QTreeWidget::item { height: 17px; padding-left: 20px; } QTreeView:indicator:!checked { width: 13px; height: 13px; } QTreeView:indicator:checked { width: 15px; height: 15px; image: url(:/images/checked.png); } QHeaderView::section { text-align: left; height: 25px; padding-left: 20px; }