class_docstr: Simple PushButton extension that paints a QPainterPath centered on its face.
      
code: def paintEvent(self, ev):
      super().paintEvent(ev)
      margin = self.margin
      geom = QtCore.QRectF(0, 0, self.width(), self.height()).adjusted(
          margin, margin, -margin, -margin
      )
      rect = self.path.boundingRect()
      scale = min(
          geom.width() / float(rect.width()),
          geom.height() / float(rect.height()),
      )
  
      p = QtGui.QPainter(self)
      p.setRenderHint(p.RenderHint.Antialiasing)
      p.translate(geom.center())
      p.scale(scale, scale)
      p.translate(-rect.center())
      p.setPen(self.pen)
      p.setBrush(self.brush)
      p.drawPath(self.path)
      p.end()
  
file_path: pyqtgraph/pyqtgraph/widgets/PathButton.py
imports: from ..None import functions
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 5 for calling the PathButton obj's underlying member method code with example usage: obj.paintEvent(ev) without return types