If the table is not wide enough then resize it according to the header width. See QTable::horizontalHeader().