Hi, I think the easiest is to actually create three QSplitters (either two horizontal inside one vertical, or vice-versa) so you have the four resizable panels, then add four separate pyqtgraph GraphicsView (or similar) instances into that splitter grid.
Boilerplate code generated from Qt Designer and pyside2-uic for demonstration: self.horizontalLayout = QHBoxLayout(Form) self.splitter_3 = QSplitter(Form) self.splitter_3.setOrientation(Qt.Vertical) self.splitter = QSplitter(self.splitter_3) self.splitter.setOrientation(Qt.Horizontal) self.graphicsView = GraphicsView(self.splitter) self.splitter.addWidget(self.graphicsView) self.graphicsView_2 = GraphicsView(self.splitter) self.splitter.addWidget(self.graphicsView_2) self.splitter_3.addWidget(self.splitter) self.splitter_2 = QSplitter(self.splitter_3) self.splitter_2.setOrientation(Qt.Horizontal) self.graphicsView_3 = GraphicsView(self.splitter_2) self.splitter_2.addWidget(self.graphicsView_3) self.graphicsView_4 = GraphicsView(self.splitter_2) self.splitter_2.addWidget(self.graphicsView_4) self.splitter_3.addWidget(self.splitter_2) self.horizontalLayout.addWidget(self.splitter_3) Hope that helps! Patrick On Wednesday, 30 June 2021 at 8:03:09 pm UTC+9:30 [email protected] wrote: > Hi > > I have an application with 4 online plots handled by RemoteGraphicsView > for performance reasons. Something like this: > > import pyqtgraph as pg > import pyqtgraph.widgets.RemoteGraphicsView > > app = pg.mkQApp() > layout = pg.LayoutWidget() > > view = pg.widgets.RemoteGraphicsView.RemoteGraphicsView() > layout.addWidget(view) > win = view.pg.GraphicsLayout() > view.setCentralItem(win) > > plt = [view.pg.PlotItem() for i in range(0,4)] > [win.addItem(p, col=0, row=i) for i,p in enumerate(plt)] > > layout.show() > > if __name__ == '__main__': > app.exec() > > I tried to make the individual plot sizes adjustable with help of > QSplitter, which in the local case worked like this: > > import pyqtgraph as pg > from pyqtgraph.Qt import QtGui, QtCore > > app = pg.mkQApp() > layout = pg.LayoutWidget() > > splitter = QtGui.QSplitter() > splitter.setOrientation(QtCore.Qt.Orientation.Vertical) > layout.addWidget(splitter) > > plt = [pg.PlotWidget() for i in range(0,4)] > [splitter.addWidget(p) for p in plt] > > layout.show() > > if __name__ == '__main__': > app.exec() > > however I wasn't able to get this working in the remote case. I tried > local and remote versions of the splitter (view.pg.Qt.QtGui.QSplitter) but > always got lost in the interactions of widgets, items and remote proxies. > > Some ideas how to get this or something similar working? > > Thanks for your help! > > Gregor > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/b569fae4-75a6-4580-851d-97200c2a1f5bn%40googlegroups.com.
