https://stackoverflow.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);
No member named 'setResizeMode' in 'QHeaderView' - Convert Qt 4.7 to Qt 5.8
原文地址:https://www.cnblogs.com/hshy/p/8966434.html
时间: 2024-10-21 06:50:24