hi , I just started with QT and I know the concept of signal/slot but in implementing it I have problem. take a look at my code :
#include "test.h"
#include <QCoreApplication>
test::test()
{
// TODO Auto-generated constructor stub
}
test::~test()
{
// TODO Auto-generated destructor stub
}
void test::fireslot(){
qDebug("the slot fired");
}
void test::dosignaling(){
QObject::connect(this,SIGNAL(callslot()),this,SLOT(fireslot()));
}
note : I've added the Q_OBJECT macro and inherit from QObject in test.h
and here is my test container
#include "test.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
//test t1();
test *t2 = new test();
t2->dosignaling();
return a.exec();
}
code compile perfect but the nothing gonna happen . I'm not quite sure which part I've made mistake :-?