Reputation: 3922
How can I remove the column with index numbers in QTableWidget
?
Upvotes: 22
Views: 20155
Reputation: 87
PyQt6
self.tableWidget.verticalHeader().setVisible(False)
self.tableWidget.horizontalHeader().setVisible(False)
Upvotes: 5
Reputation: 9764
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);
Upvotes: 43