class_docstr: Button graphicsItem displaying an image.
class_docstr_tok: ["Button","graphicsItem","displaying","an","image","."]
code: def __init__(
      self, imageFile=None, width=None, parentItem=None, pixmap=None
  ):
      self.enabled = True
      GraphicsObject.__init__(self)
      if imageFile is not None:
          self.setImageFile(imageFile)
      elif pixmap is not None:
          self.setPixmap(pixmap)
  
      self._width = width
      if self._width is None:
          self._width = (
              self.pixmap.width() / self.pixmap.devicePixelRatio()
          )
  
      if parentItem is not None:
          self.setParentItem(parentItem)
      self.setOpacity(0.7)
  
file_path: pyqtgraph/pyqtgraph/graphicsItems/ButtonItem.py
imports: from ..Qt import QtCore, QtGui
  from .GraphicsObject import GraphicsObject
label_desc: Use image node_id 1 to create a new ButtonItem object from inherited base classes: GraphicsObject with example: obj = ButtonItem(imageFile, width, parentItem, pixmap)