How to remove the vertical header in QStandardItemModel?

9.4k Views Asked by At

I have created a table using QTableView and a QStandardItem widget. How to remove the vertical header from QStandardItemModel?

1

There are 1 best solutions below

1
On BEST ANSWER

Use the header's hide() method:

QTableView * view = new QTableView();
view->verticalHeader()->hide();

Don't forget to #include <QHeaderView>.