How to Remove the Header in QTableView?
-
As shown in the Image below, How can i remove the unwanted header section ?
![IMG]http://i.imgur.com/DAmMlv5.png[/IMG](TableView Header)!
I tried using setStretchLastSection(), But I don't want to stretch it. Without Stretching the Last Section how can i remove the Header part.
-
"QHeaderView * QTableView::horizontalHeader() const":http://qt-project.org/doc/qt-5.1/qtwidgets/qtableview.html#horizontalHeader
and
"void QHeaderView::hideSection(int logicalIndex)":http://qt-project.org/doc/qt-5.1/qtwidgets/qheaderview.html#hideSection
maybe?You can also use
"QAbstractItemModel * QAbstractItemView::model() const":http://qt-project.org/doc/qt-5.1/qtwidgets/qabstractitemview.html#model
and then either hide the section or completely remove that column.Maybe I missed the point, but why is that last section different from the others? It shouldn't be - are you sure you are looking at this from the right angle?