GraphicsScene may have no ViewWidget

30 views
Skip to first unread message

Jaime R.

unread,
Oct 5, 2022, 6:57:23 PM10/5/22
to pyqtgraph
The current GraphicsScene class has the following method:

def getViewWidget(self):
     return self.views()[0]

But calling it without having created a GraphicsView causes a IndexError because self.views() returns a empty list. Shall the method return None in case it has no view associated?
Reply all
Reply to author
Forward
0 new messages