Python Forum
[PyQt] Why widget is resized
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Why widget is resized
#1
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 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?
Reply


Messages In This Thread
Why widget is resized - by malonn - Oct-08-2022, 09:06 PM
RE: Why widget is resized - by malonn - Oct-08-2022, 09:47 PM
RE: Why widget is resized - by malonn - Oct-09-2022, 11:56 AM
RE: Why widget is resized - by Axel_Erfurt - Oct-09-2022, 12:20 PM
RE: Why widget is resized - by malonn - Oct-09-2022, 12:31 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020