signal and slot can not connect
-
I have two widgets, one of which have a signal 'void subMarket(string)', the other have a public slot 'void subMarket(string)'. I connect them and there is no compile error or run time warning, but when i emit the signal 'subMarket(string)', the slot function is not invoked, and there is not any warning. could anyone help me fix this problem?
attach snapshot of two class:class mdwidget :public QWidget{
Q_OBJECT
public:
mdwidget(MessageHub*_hub = 0);
signals:
void subMarket(string ins);
public slots:
};class MessageHub :public QObject{
Q_OBJECT
public:
MessageHub(){}
public slots :
void subMarket(string ins);
}; -
I have two widgets, one of which have a signal 'void subMarket(string)', the other have a public slot 'void subMarket(string)'. I connect them and there is no compile error or run time warning, but when i emit the signal 'subMarket(string)', the slot function is not invoked, and there is not any warning. could anyone help me fix this problem?
attach snapshot of two class:class mdwidget :public QWidget{
Q_OBJECT
public:
mdwidget(MessageHub*_hub = 0);
signals:
void subMarket(string ins);
public slots:
};class MessageHub :public QObject{
Q_OBJECT
public:
MessageHub(){}
public slots :
void subMarket(string ins);
};@EricWilson
ok, this bug turn out to be my mistake signal senders..