Skip to content

minirop/SignalsSpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Allow you to know which Qt signals are called. (~Qt 4.7)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages