Re: Cannot hide QTableWidget's vertical header.
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
Code:
tableWidget->verticalHeader()->setVisible(false);
But I get the following error:
Code:
error: invalid use of incomplete type 'class QHeaderView'
tableWidget->verticalHeader()->setVisible(false);
I am using Qt 5.2
Added after 39 minutes:
Solved it using
Code:
vh->hide();
tableWidget->setVerticalHeader(vh);
Re: Cannot hide QTableWidget's vertical header.
incomplete type means that the compiler does not know any details about the class QHeaderView, it just knows that it exists, but not which methods it has.
Include the header for the class.
Code:
#include <QHeaderView>
Cheers,
_
Re: Cannot hide QTableWidget's vertical header.
That is a cleaner way you post it......sorry I mistakenly included QTableView instead of QHeaderView