D
D
Denis2015-10-24 23:25:20
Qt
Denis, 2015-10-24 23:25:20

How to make a click event on all QT GUI elements?

Good day.
Suppose my form has all the standard GUI elements.
For some reason, I need to process clicks on them.
The standard "Click" signal is, as I hope everyone knows, only a few elements, tell me how they do it in such cases.
Extend all classes of standard elements by inheriting them into new classes, or rewrite the Event_Click event to determine which element the user clicked on?
Or is there another way I'm not aware of?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antony, 2015-10-24
@lacredin

You make an object for event handling and assign its instance to all widgets as eventfilter.
There are much more different events than signals. And you always know which of the objects this event was addressed to.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question