int wide = m_pFieldTable->columnWidth(0);  
int nRow = m_pFieldTable->rowCount();  
for(int i =0; i<nRow; i++)  
{  
           m_pFieldTable->setColumnWidth(0, wide);                  
           m_pFieldTable->setRowHeight(i, 25);   
}  

必须得setColumnWidth和setRowHeight一起使用才能改变行高,这两个函数在QTableView中。

 

转自:http://blog.csdn.net/sundan308/article/details/8743079

 

其他:

verticalHeader()->setDefaultSectionSize()

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-10-07
  • 2021-04-30
  • 2021-08-04
  • 2022-12-23
  • 2021-08-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
相关资源
相似解决方案