1. 效果
- 未隐藏

- 隐藏

2. 方法
- 方法1
c
ui->treeWidget->header()->hide();
- 方法2
c
ui->treeWidget->header()->setVisible(false);