Reputation: 17223
I wanted to know how I can gain access to the sectionsInserted slot.I need access to the parameters of that method. Since it is a protected slot I think I would need to inherit from QHeaderView. Now even if I inherit from QheaderView how would I attach that Qheaderview to my tableview ?
Upvotes: 1
Views: 109
Reputation: 40502
You should use QAbstractItemModel::columnsInserted
or QAbstractItemModel::rowsInserted
signals instead. They have exactly the same signature. I believe they are connected to the QHeaderView::sectionsInserted
slot.
Subclassing QHeaderView
will not help you. QHeaderView::columnsInserted
is not virtual, so your implementation will not be called by Qt.
Upvotes: 1
Reputation: 25155
You can set the vertical and horizontal headers of a QTableView with QTableView::setVerticalHeader() and QTableView::setHorizontalHeader(), respectively.
Upvotes: 1