PlotItem.scene()
has a QGraphicsScene
type hint instead of a pyqtgraph.GraphicsScene
#3024
Labels
PlotItem.scene()
has a QGraphicsScene
type hint instead of a pyqtgraph.GraphicsScene
#3024
Short description
PlotItem.scene()
has a type hint ofQGraphicsScene | None
instead of apyqtgraph.GraphicsScene
. This raises an error when trying to access signals from the scene, such assigMouseMoved
.Code to reproduce
This is an abridged snippet of code from the
crosshair.py
example:Proposed Solution
I think this can be fixed by adding a type hint to the
GraphicsWidget
class:If this seems reasonable, I can draft a PR.
Tested environment(s)
The text was updated successfully, but these errors were encountered: