Oct-08-2022, 09:06 PM
I have a QGridLayout that, when it is complete, has 3 columns. I don't understand something though. Column 0 is a fixed-width frame (has Qlabels in it, but doesn't matter re: this question), column 1 is a QTableView, and column 2 is a QLabel set to an image.
Here's what I don't understand: I have reimplemented sizeHint for the QTableView, and when coulmn 2 is not set (gridded), the tableview follows the size returned by its sizeHint. But, if coulmn 2 is set (gridded), the tableview shrinks to it's default size (returned by
Here's what I don't understand: I have reimplemented sizeHint for the QTableView, and when coulmn 2 is not set (gridded), the tableview follows the size returned by its sizeHint. But, if coulmn 2 is set (gridded), the tableview shrinks to it's default size (returned by
QTableView.size()
, which never changes in my testing). Why does it behave like this? How can I get my tableview to follow its sizeHint in all conditions?