The Environment:
- OS: Windows 7 64-bit
- QT Version: QT 5.4.1
- Compiler: win64_vc11.0

The Scenario:
I have used Qt Designer to create a QDialog which contains several nested layouts containing multiple QTableViews. I am using CMake to create my Visual Studio project. In this process, CMake "build" the .ui file into the appropriate C++ files.

The Need:
I want to be able to handle a mouse click on one of those tables and know which cell was clicked.

The Problem
When I use "setMouseTracking(true)" on the containing dialog, it does not handle mouse clicks on the previously mentioned QTableView.

My First Solution (and why it doesn't work):
My first thought was to extend QTableView with my own class so that I could override the "mousePressEvent()" function, but the QTableView is "built" by CMake, so I can't just replace it with my own class which extends QTableView or I loose the position and settings configured in QtDesigner.


Does anyone have any idea how I can solve my problem?