'Return a QRectF in local coordinates containing the entire row.'

def row_rect(self, row):

    rect = self.cell_rect(row, 0)
    rect.setLeft(0)
    rect.setRight(self.size().width())
    return rect
