how to get MouseClick Event in this case
I have a QMainWindow which has some child controls (eg. QTableView).
Now I want to QMainWindow get all mouse click event. How to do this?
I am using Qt4.3 with XP
I have tried eventFilter() in QMainWindow, but problem is when you click on the QTableView(actually any kind of child control)
,progrom can't enter the QMainWindow's eventFilter().
Can anybody help me?
Re: how to get MouseClick Event in this case
various possibilites:
* you can use eventFilter() (don't forget to install it on all the watched widgets!)
* you should read QCoreApplication::notify()
other question: why do you want that?
HTH
Re: how to get MouseClick Event in this case
that is my special case:
there is a button, click this button will popup a frameless widget, then when you click any other position in my main window will make this widget disappear. so In my main window I want to get mouse click event even if you click main window's child control.
Re: how to get MouseClick Event in this case
I have done this as below:
just using QCoreApplication::notify(), thanks caduel!