views:

197

answers:

1

Is there any way to observe all signals which are emitted?

PS. Of course we can write slots for all signals, but that is not I want.

Thanks.

+3  A: 

What do you mean by observing? Do you need real time feedback on console, or is logging to file on program exit enough?

If you need real time feedback on console, you can check then implementation of QTest. There is a -vs command line switch (Qt doc) which enables all signals printout on console (or you can just run your QTest tests with -vs switch, if you need the signals info only in tests, not in actual application).

The other way is to use QSignalSpy class. It's not ideal however, because you need one spy per every signal, and you have to print the observed signals periodically (there are no notifications in QSignalSpy).

chalup
Both works for me real time feedback on console and logging to file on program exit.
metdos
By "-vs switch" what you mean?
metdos
@metdos: I guess he assume an option to put into the command line.
ereOn
Yes, I mean command line argument. I've also added documentation link to my answer.
chalup