Keep widget size fixed and add to scrollable tab
-
I'm trying to create a tab which would be scrollable and fill it with table widgets where the tables to keep their original size. My tab keeps growing vertically and no scroll bar appears. How do I keep both the tab a fixed size and and all the table widgets fixed size and allow the user to scroll down the tab to see all the tables included. What I do now seems to grow the size of the tab. What's the right way to do this.
-
@Ed-Schneider https://doc.qt.io/qt-6/qwidget.html#setFixedSize or https://doc.qt.io/qt-6/qwidget.html#setFixedHeight if you only need fixed height.
-
@jsulm I've been using setFixedHeight but that was not enough. Only once I added some pad to the height of the table did the setFixedHeight do the job. I've not figured out why a pad of +4 work sometimes and other times +8 or even +20 was needed. If anyone knows I'd love to hear. At this point I've got it working but have no idea why the pad required is not the same for all. Still a mystery.