How to get the mouse event on tablewidget(row /column) selection area?
-
Hi, I need to capture the event of selecting the rows/columns from QTableWidget. I am able to get the selected rows/ columns through the function
QModelIndexList rowList = ui->m_TableWidget->selectionModel()->selectedRows();
QModelIndexList colList = ui->m_TableWidget->selectionModel()->selectedColumns(); but i need a mouse point when this event is occured.
Any help is much appreciated. -
Hi,
Which mouse point are you after ?
-
@SGaist mouse button clicked/pressed event. I am able to get mouse clicked event inside QTableWdget but outside the cells. I need a point on vertical/horizontal header. Installed event filter on QTableWidget
ui->m_TableWidget->viewport()->installEventFilter( this ); and capturing the events by overriding the eventfilter function -
Then also install the event filter on the headers.