'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.'

def addItem(self, item, row=None, col=None, rowspan=1, colspan=1):

    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))
    self.layout.addItem(item, row, col, rowspan, colspan)
    self.nextColumn()
