class_docstr: Used for laying out GraphicsWidgets in a grid.
  This is usually created automatically as part of a :class:`GraphicsLayoutWidget <pyqtgraph.GraphicsLayoutWidget>`.
class_docstr_tok: ["Used","for","laying","out","GraphicsWidgets","in","a","grid",".","This","is","usually","created","automatically","as","part","of","a",":","class",":","`","GraphicsLayoutWidget","<","pyqtgraph.GraphicsLayoutWidget",">","`","."]
docstr: Add an item to the layout and place it in the next available cell (or in the cell specified).
  The item must be an instance of a QGraphicsWidget subclass.
docstr_tok: ["Add","an","item","to","the","layout","and","place","it","in","the","next","available","cell","(","or","in","the","cell","specified",")",".","The","item","must","be","an","instance","of","a","QGraphicsWidget","subclass","."]
code: def addItem(self, item, row=None, col=None, rowspan=1, colspan=1):
      """
      Add an item to the layout and place it in the next available cell (or in the cell specified).
      The item must be an instance of a QGraphicsWidget subclass.
      """
      if row is None:
          row = self.currentRow
      if col is None:
          col = self.currentCol
  
      self.items[item] = []
      for i in range(rowspan):
          for j in range(colspan):
              row2 = row + i
              col2 = col + j
              if row2 not in self.rows:
                  self.rows[row2] = {}
              self.rows[row2][col2] = item
              self.items[item].append((row2, col2))
  
      borderRect = QtWidgets.QGraphicsRectItem()
  
      borderRect.setParentItem(self)
      borderRect.setZValue(1e3)
      borderRect.setPen(fn.mkPen(self.border))
  
      self.itemBorders[item] = borderRect
  
      item.geometryChanged.connect(self._updateItemBorder)
  
      self.layout.addItem(item, row, col, rowspan, colspan)
      self.layout.activate()  # Update layout, recalculating bounds.
      # Allows some PyQtGraph features to also work without Qt event loop.
  
      self.nextColumn()
  
imports: from ..None import functions
  from ..Qt import QtWidgets
  from .GraphicsWidget import GraphicsWidget
  from .LabelItem import LabelItem
  from .PlotItem import PlotItem
  from .ViewBox import ViewBox
label_desc: Use image node_id 10 for calling the GraphicsLayout obj's underlying member method code with example usage: obj.addItem(item, row, col, rowspan, colspan) without return types