Reimplement the mouseMoveEvent so that the user can scroll the chart area.
(self, event)
| 39 | self.start_pos = event.pos() |
| 40 | |
| 41 | def mouseMoveEvent(self, event): |
| 42 | """Reimplement the mouseMoveEvent so that the user can scroll the chart area.""" |
| 43 | if (event.buttons() == Qt.LeftButton): |
| 44 | delta = self.start_pos - event.pos() |
| 45 | self.chart.scroll(delta.x(), -delta.y()) |
| 46 | self.start_pos = event.pos() |
| 47 | |
| 48 | def mouseReleaseEvent(self, event): |
| 49 | self.setDragMode(QGraphicsView.NoDrag) # Don't display mouse cursor |
nothing calls this directly
no outgoing calls
no test coverage detected