Suppose I have an application that is made using Qt. There I have a bunch of QPushBUttons here and there.
I want to be able to log the moment when any of QPushButton being pressed. (application wide). Assuming the existing code should be intact, What will be the best option for that?
( Derive from QPushButton and re-implementing keyPressEvent is not a solution because client code will be changed and will be obligatory to use other class rather than ordinary QPushButton )