There are two variants of QHeaderView::setResizeMode() - one is working on the whole header and the other on a single section.