https://*.com/questions/42743141/no-member-named-setresizemode-in-qheaderview-convert-qt-4-7-to-qt-5-8
7down voteaccepted
I guess you need to replace two obsolete lines:
table->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
table->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
with the following Qt 5 code:
table->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
table->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);