what is the mistake in my code
- by Solitaire
class myslot
{
public:
Q_OBJECT
myslot()
{
}
~myslot()
{
}
typedef enum Emycars{volvo,benz,tata}cars;
public slots:
void hellowslot(myslot::cars);
};
void myslot::hellowslot(myslot::cars cars1)
{
}
class mysignal
{
public:
Q_OBJECT
public:
mysignal(myslot *ourslot)
{
bool val = QObject::connect(this,SIGNAL(hellowsignal(myslot::Emycars)),ourslot,SLOT(hellowslot(myslot::Emycars)));
}
~mysignal()
{
}
signals:
void hellowsignal(myslot::Emycars);
};
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
myslot slot;
mysignal sig(&slot);
// DeleteNow w;
// w.showMaximized();
return a.exec();
}
what is the mistake in mycode, the way which i have written connect for the function which recive enum is right or not?
please let me know where i am wrong.