what is the mistake in my code
Posted
by Solitaire
on Stack Overflow
See other posts from Stack Overflow
or by Solitaire
Published on 2010-03-19T11:22:44Z
Indexed on
2010/03/30
6:53 UTC
Read the original article
Hit count: 332
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.
© Stack Overflow or respective owner