QTableView根据内容自动调整列宽行高

来源:互联网 发布:Apple Watch解锁mac 编辑:程序博客网 时间:2024/05/16 05:32
根据内容自动调整某列的列宽
void QTableView::resizeColumnToContents ( int column ) [slot]

Resizes the given column based on the size hints of the delegate used to render each item in the column.


根据内容自动调整所有列的列宽
void QTableView::resizeColumnsToContents () [slot]

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


根据内容自动调整某一行的行高
void QTableView::resizeRowToContents ( int row ) [slot]

Resizes the given row based on the size hints of the delegate used to render each item in the row.


根据内容自动调整所有行的行高。
void QTableView::resizeRowsToContents () [slot]

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

0 0
原创粉丝点击