Sep-15-2023, 09:44 AM
I am using a
I'm not going to share code (I know that will limit any help) because 1) it's split up over multiple modules, and 2) I believe it to be buggy type behavior within StyleSheets (I read StyleSheets are kinda buggy). If it is buggy behavior, is there a workaround?
Currently, I have my app working the way I want by setting the layout's size (
I've tried
QTreeView
with a StyleSheet set to it. This tree has checkboxes, and the style replaces the image for the empty, checked and partially checked boxes. My issue is, when I set the StyleSheet, the last column/section is stretched beyond what I set it to (I manually set section/column sizes via tree.setColumnWidth()
. I've also tried header.resizeSection()
). Without the StyleSheet, everything works as intended.I'm not going to share code (I know that will limit any help) because 1) it's split up over multiple modules, and 2) I believe it to be buggy type behavior within StyleSheets (I read StyleSheets are kinda buggy). If it is buggy behavior, is there a workaround?
Currently, I have my app working the way I want by setting the layout's size (
QGridLayout
: column width) that houses the QTreeView
. This question is more for academic purposes—can it be fixed via StyleSheets or something else?I've tried
QTreeView::section:last{width: 110;}
, QTreeView::section:last{max-width: 110;}
, and header.setMaximumSectionSize(110)
. Any ideas?