Where to mouse clicks go from QTableWidget headers?
My app has 2 QTableWidget objects. I need to know when the user selects a row in one of the tables by clicking on a row header. mouseReleaseEvent() tells me when the user clicks anywhere inside the table but not when a row header is clicked (which selects all cells in the table row). What can I use to trap these mouse clicks?
Re: Where to mouse clicks go from QTableWidget headers?
Connect to QHeaderView::sectionClicked() signal (you can obtain QHeaderView object using QTableView::horizontalHeader()).
Re: Where to mouse clicks go from QTableWidget headers?
You want to get the QHeaderView for the table widget (using the horizontalHeader member function).
Re: Where to mouse clicks go from QTableWidget headers?
Thanks so much! I knew there must be an easy way but I just couldn't find it. (I'm getting Qt training... but after the first release of the product:confused: !)