I am trying to hide the vertical header of a QTableWidget but I get error.
What I learned from all similar questions is that I need to use
tableWidget->verticalHeader()->setVisible(false);
tableWidget->verticalHeader()->setVisible(false);
To copy to clipboard, switch view to plain text mode
But I get the following error:
error: invalid use of incomplete type 'class QHeaderView'
tableWidget->verticalHeader()->setVisible(false);
error: invalid use of incomplete type 'class QHeaderView'
tableWidget->verticalHeader()->setVisible(false);
To copy to clipboard, switch view to plain text mode
I am using Qt 5.2
Added after 39 minutes:
Solved it using
vh->hide();
tableWidget->setVerticalHeader(vh);
vh=new QHeaderView(Qt::Vertical);
vh->hide();
tableWidget->setVerticalHeader(vh);
To copy to clipboard, switch view to plain text mode
Bookmarks