PDA

View Full Version : How to set QTableView width to width of horizontal header?



martinb0820
2nd December 2008, 20:51
I have a QTableView with a horizontal header and a couple of columns. I would like to set the width of the table view to exactly show all the columns in their correct width. (So I do not want to setStretchLastSection(true)).

I've tried lots of combinations of size policies, resizing, etc.

Could someone tell me how to do this?

Thanks in advance,
Martin