I want to add a grid of plots to a splitter. I know how to set vertical (QSplitter(Qt.Vertical)) and horizontal (QSplitter(Qt.Horizontal)) layouts to a splitter but not sure how to make it in grid layout.
Asked
Active
Viewed 1,130 times
-1
-
Can you clarify what you want? You can have "nested" QSplitters by adding (for example) horizontal QSplitters to a vertical one. – musicamante Jun 30 '20 at 19:00
-
I figured that out by adding a widget to the splitter and setting widget layout to QGridlayout. – jabbarlee Jul 03 '20 at 16:54
1 Answers
0
I figured it out like this:
self.plot_splitter = QSplitter(Qt.Vertical)
self.plot_grid = QGridLayout()
self.plot_widget = QWidget()
self.plot_widget.setLayout(self.plot_grid)
self.plot_splitter.addWidget(self.plot_widget)

jabbarlee
- 110
- 2
- 11