You could try creating a QHeaderView that ignores the model's header data and uses the visual section number for the label.