def drawPoints(self, points, pointCount=None): if pointCount is None: pointCount = len(points) device = self.nullDevice() if device is None: return if device.mode() != QwtNullPaintDevice.NormalMode: try: QPaintEngine.drawPoints(points, pointCount) except TypeError: # PyQt <=4.9 QPaintEngine.drawPoints(self, points) return device.drawPoints(points, pointCount)