I have created a table using QTableView
and a QStandardItem
widget. How to remove the vertical header from QStandardItemModel
?
How to remove the vertical header in QStandardItemModel?
Asked Answered
You don't remove it from the model, you hide it in the view –
Precinct
Use the header's hide()
method:
QTableView * view = new QTableView();
view->verticalHeader()->hide();
Don't forget to #include <QHeaderView>
.
For
QTreeView
, use treeView->header()->hide()
–
Cherilyncherilynn © 2022 - 2024 — McMap. All rights reserved.