Custom QHeaderView header size problem
General and Desktop
7
Posts
2
Posters
2.0k
Views
1
Watching
-
Hi everyone,
I'm trying to subclass QHeaderView to add some behavior i need (context menu with column to show/hide, add a lineEdit in the header to filter columns ...)
My header is added to a QTreeView with setHeader function.
My problem is that sections can be resized to a smaller size than the text in the header section. How can i force a minimum size column by column, depending on the header text ?
-
Hi and welcome to devnet,
Did you try the minimumSectionSize property ?
-
-
What about sectionSizeHint ?
-
Right, well, currently I can't see a better way than your workaround. Are you stuck with a precompiled version of Qt ? If not you could have a look and try to back port the handling you need