How to remove padding on columns QTreeview
Unsolved
General and Desktop
-
As you can see in my picture I have two columns the first column has padding on the right of the pixmap and the second column has padding on the right of the pixmap. These are both pixmaps that are DecorationRoles that are scaled from 64x64 to 16x16.
This is how I try to resize the columns currently:
this->header()->setSectionResizeMode(QHeaderView::Fixed); this->resizeColumnToContents(0); this->resizeColumnToContents(1);
I have no padding added on my QSS
-
@Tater The space is for the text of the DisplayRole you are not providing, and is at least as big as the section width. Start by looking at the QHeaderView::minimumSectionSize(). If you want to provide a completely custom rendering for the items then you probably need to roll your own QStyledItemDelegate.