Last active
August 29, 2015 14:20
-
-
Save matthieuheitz/caf1cdac19f36bf523c8 to your computer and use it in GitHub Desktop.
Custom slots to debug signals, verify if they are fired
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QMessageBox> | |
class myClass: | |
{ | |
// Insert those slots in your myClass.h | |
public slots: | |
void displaySignal(QString); | |
void displaySignal(int); | |
void displaySignal(float); | |
void displaySignal(double); | |
void displaySignal(bool); | |
} | |
// Insert implementation in myClass.cpp | |
void myClass::displaySignal(QString arg) | |
{ | |
QMessageBox::information(this,"Signal received",arg,QMessageBox::Ok); | |
} | |
void myClass::displaySignal(int arg) | |
{ | |
QMessageBox::information(this,"Signal received",QString::number(arg),QMessageBox::Ok); | |
} | |
void myClass::displaySignal(float arg) | |
{ | |
QMessageBox::information(this,"Signal received",QString::number(arg),QMessageBox::Ok); | |
} | |
void myClass::displaySignal(double arg) | |
{ | |
QMessageBox::information(this,"Signal received",QString::number(arg), QMessageBox::Ok); | |
} | |
void myClass::displaySignal(bool arg) | |
{ | |
QMessageBox::information(this,"Signal received",QString::number(arg),QMessageBox::Ok); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment