Removing index numbers in QTablewidget

2020-02-09 09:31发布

问题:

How can I remove the column with index numbers in QTableWidget ?

回答1:

Not quite obvious, there are two views the vertical and the horizontal header, they are defined in QTableView, as any widget you can hide them so its

myTableWidget->verticalHeader()->setVisible(false);