Allow you to know which Qt signals are called. (~Qt 4.7)
C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Readme.md
SignalIdentifier.cpp
SignalIdentifier.h
SignalsSpy.cpp
SignalsSpy.h
licence.txt

Readme.md

SignalsSpy

SignalsSpy allow you to track QObjects' signals emissions. It's the opposite of QSignalMapper. Track all signals from a single object.

installation

copy the files in the directory of your project, add the file to your .pro and enjoy (qmake may be necessary).

constructor

  • QObject * object : the object to monitor and the parent of the SignalsSpy.

signals

  • emitted(QString signature) : send the signature of the signal that just been emitted, like "valueChanged(int)"
  • emittedNameOnly(QString name) : send the name of the signal that just been emitted, like "valueChanged"

example

QPushButton * button = new QPushButton("click me!");
SignalsSpy * spy = new SignalsSpy(button);
connect(spy, SIGNAL(emitted(QString)), button, SLOT(setText(QString)));

When you'll click the button, the displayed text should go through something like : pressed, released, clicked( bool ), clicked