poll QTableView for selected headers
I have a QTableView in which the headers are selectable. I would like to poll its headers to know which headers are selected. I can't find any information on this.
Is this possible?
QItemSelectionModelpointer for the relevant
QHeaderViewand from that use the
selected()member to check the selection status of the items.
Better still, connect the
selectionChanged()signal for the header view items then there is no need to poll at all.
Better is in the eyes of the beholder. Why keep track of something that the system keeps track of for you? I don't need this information immediately, just when a context menu item is selected.
Thanks for the answer.