Embedding GLViewWidget in a QStackedWidget or QTabWidget

28 views
Skip to first unread message

Erik J

unread,
Sep 27, 2019, 2:02:29 PM9/27/19
to pyqtgraph
Hello,

I am developing some status screen GUIs using QtCreator and am using PyQtGraph widgets in various places (multi-Hz image displays with HIstogramLutWidgets). In this case I am using a GLViewWidget and instantiating a GLSurfacePlotItem in it. If the GLViewWidget is embedded in a QStackedWidget ot QTabWidget it appears in its own separate window when I run the GUI, and its tabbed or stacked widget in the GUI is blank. If I embed the GLViewWidget in a simple QFrame then the GLSurfacePlotItem appears within the QFRame as expected.

Has anyone else experienced this and can provide any help?

Thanks,
Erik


Erik J

unread,
Oct 2, 2019, 6:27:11 PM10/2/19
to pyqtgraph
Hi all,

When I removed self.show() from the widget constructor this problem when away. Must have been some kind of race condition where show() was called before the widget was completely instantiated and it created a new window in which to display it.

Erik
Reply all
Reply to author
Forward
0 new messages