Hi,
thank you for your answer. Am Donnerstag, 1. Juli 2021, 05:13:01 CEST schrieb Patrick: > I think the easiest is to actually create three QSplitters ... > then add four separate pyqtgraph GraphicsView ... > Hope that helps! No, unfortunately not. This only resembles my second code snippet how it would work with local GraphicViews. I need to use a RemoteGraphicsView for performance reasons and I think I have to use only one because the x-axes of the plots are linked together. On the RemoteGraphicsView I only found methods to addItems but no way to addWidgets. May be I need a way to turn a QSplitter into an Item to do something like: view.setCentralItem(splitter) Gregor On Thu, Jul 1, 2021 at 5:13 AM Patrick <[email protected]> wrote: > 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 a topic in the > Google Groups "pyqtgraph" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pyqtgraph/buXRTEefm-0/unsubscribe. > To unsubscribe from this group and all its topics, 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 > <https://groups.google.com/d/msgid/pyqtgraph/b569fae4-75a6-4580-851d-97200c2a1f5bn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAEvSrYLKbhBAYOvM9D8uKVZ-hHMa_2ohVUwjqmz2Ax67VrALvw%40mail.gmail.com.
