How to set a Slot receiving every Widget action
-
I'm trying to arrange a slot able to "capture" every event happened related to pressed pushbuttons and Qmouse events on my widgets.
For QMouse events I solved, since all MousePressEvent are captured from the same function; what I'm looking for is how to "capture" every buttons whatever it is.
It seems to be QCoreApplication::notify a good way to make it, but I don't know how to set it.
Any suggestion? -
Hi,
What about keyPressEvent ?
-
Hi,
What about keyPressEvent ?
-
keyPressEvent reacts to keyboard related events. QPushButton doesn't generate any key event (it receives them though)
-
What kind of event are you interested in ?
-
@SGaist
I've to detect every pressed Pushbuttons, Qdial actions, QSliders and Qmouseevent (this last already done), in order to do "something" when one of the cited elements act. My app is intended for the use in an embedded system connected to a touchscreen LCD display. When the user touches LCD OR press any Button, I've to activate a slot. My problem is I don't know what kind of signal common to all my widgets (if exists) , can be used. -
There's no common signal/event to every widget. You have to implement that tracking yourself.
-
target->installEventFilter(this);