Qtablewiget 清空表格内容;

来源:互联网 发布:微信怎么分享淘宝店铺 编辑:程序博客网 时间:2024/05/02 01:55
void QTableWidget::clear () [slot]//清空掉表格内所有内容,包括标题头

Removes all items in the view. This will also remove all selections. The table dimensions stay the same.

void QTableWidget::clearContents () [slot]//这个清空所有内容不包括标题头

Removes all items not in the headers from the view. This will also remove all selections. The table dimensions stay the same.



  1. void QTableWidget::removeColumn ( int column ) [slot]//这个是删除一列,而不是清空表格  
  2.   
  3. Removes the column column and all its items from the table.  
  4.   
  5. void QTableWidget::removeRow ( int row ) [slot]//这个是删除一行,不是清空一行  
  6.   
  7. Removes the row row and all its items from the table. 

0 0