QTableWidge拉伸后单元格只填充了一半,怎么将剩余的部分也显示字符

如图所示,拉伸后由于字符串太长第一列单元格只填充了一半,怎么将剩余的部分也显示字符

Jason990420
最佳答案

Try to call these methods,

void QTableView::resizeColumnsToContents()

Resizes all columns based on the size hints of the delegate used to render each item in the columns.

void QTableView::resizeRowsToContents()

Resizes all rows based on the size hints of the delegate used to render each item in the rows.

6个月前 评论
讨论数量: 1
Jason990420

Try to call these methods,

void QTableView::resizeColumnsToContents()

Resizes all columns based on the size hints of the delegate used to render each item in the columns.

void QTableView::resizeRowsToContents()

Resizes all rows based on the size hints of the delegate used to render each item in the rows.

6个月前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!