Skip to content

minirop/SignalsSpy

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

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