QTabWidget in ScrollArea
-
Hi,
I found already some similar threads about it, but none of the helped me. In the project Labplot we are using a QTabWidget inside a ScrollArea. If the content of one Tab is larger than the Scrollarea, the scrollbars occurs and I am able to scroll through the widget. The problem is when in a second tab a smaller widget is placed (A vertical spacer which expands) which does not need the complete space of the scrollarea, the scroll bars are still visible so it will be scrolled but this makes totaly no sense there.
One solution would be to put on every tab a scrollArea and putting all Widgets in it. This works fine, but it has to be done for every tab (We have quite a lot of TabWidgets where we have to do it then).
Is there another way solving that problem?
The issue is also described here (with video): Labplot Scroll Area Issue
-
Hi,
What about using QTabBar on top of a QScrollArea containing a QStackedWidget ? That way you would have one single QScrollArea and pilot its content with one tab bar.
-
One other way could be to trigger a resize when switching by requesting the sizeHint of the now facing widget.