No member named 'setResizeMode' in 'QHeaderView' - Convert Qt 4.7 to Qt 5.8

Posted 人,唯一剥夺不了的,只有知识

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No member named 'setResizeMode' in 'QHeaderView' - Convert Qt 4.7 to Qt 5.8相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章

“echarts”‘ has no exported member named ‘EChartOption‘. Did you mean ‘EChartsOption‘ instead?

“echarts”‘ has no exported member named ‘EChartOption‘. Did you mean ‘EChartsOption‘ instead?

VSCODE 报错 Module ‘xx‘ has no ‘xx‘ member pylint(no-member)

VSCODE 报错 Module ‘xx‘ has no ‘xx‘ member pylint(no-member)

VS Code报错Module 'xx' has no 'xx' member pylint(no-member)解决办法

ModuleNotFoundError: No module named 'utils'