qt的QTableWidget行数多了以后特别慢

解决方法:禁用headerview的ResizeToContent:

 

Qt 4.*

pTable ->horizontalHeader() ->setResizeMode( QHeaderView::Fixed );

pTable ->verticalHeader() ->setResizeMode( QHeaderView::Fixed );

 

 

 

Qt 5

pTable ->horizontalHeader() ->setSectionResizeMode( QHeaderView::Fixed );

pTable ->verticalHeader() ->setSectionResizeMode( QHeaderView::Fixed );

 

你可能感兴趣的:(qt)