ive created a QtabWidget() with 2 tabs.
i also have a scroll area set inside a gridlayout.
I'm trying to add the scrollarea to tab1 of the tabWidget.
i tried using .setlayout, but that doesnt seem to work. My scroll area just sits on top of the tabs. How do I add items to Tab1?
self.myTab.addTab(self.tab1, "TAB1")
self.myTab.addTab(self.tab2, "TAB2")
self.
myScrollArea_Container = QWidget()
self.myScrollArea_Container.setLayout(gridlayout with some stuff)
self.myScrollArea.setWidget(self.myScrollArea_Container)
self.myScrollArea_GridLayout.addWidget(self.myScrollArea)
self.myTab.setLayout(self.myScrollArea_GridLayout)
self.myTab = QTabWidget()
self.tab1 = QWidget()
self.tab2 = QWidget()
self.myTab.addTab(self.tab1, "TAB1")
self.myTab.addTab(self.tab2, "TAB2")
self.myScrollArea = QScrollArea()
self.myScrollArea_Container = QWidget()
self.myScrollArea_GridLayout = QGridLayout()
self.myScrollArea_Container.setLayout(gridlayout with some stuff)
self.myScrollArea.setWidget(self.myScrollArea_Container)
self.myScrollArea_GridLayout.addWidget(self.myScrollArea)
self.myTab.setLayout(self.myScrollArea_GridLayout)
To copy to clipboard, switch view to plain text mode
In the attached pic, you can see the issue where the scrollArea isnt inside, but sitting ontop of the tabs
Bookmarks