Object::connect: 没有这样的信号 RollsRoyceTab::signal_aValueChange(int aValue) ??????
我有
class RollsRoyceTab : public QWidget
{
Q_OBJECT
public:
RollsRoyceTab(QWidget *parent = 0);
public slots:
void aValueChange(int);
void bValueChange(int);
void cValueChange(int);
void rrValuesHolder(int aValue, int bValue, int cValue);
signals:
void signal_aValueChange(int aValue);
void signal_bValueChange(int bValue);
void signal_cValueChange(int cValue);
private:
.........
int aValue, bValue, cValue;
};
............
connect(this,SIGNAL(signal_aValueChange(int aValue)),this,SLOT(rrValuesHolder(int aValue, int bValue, int cValue)));
}
void RollsRoyceTab::aValueChange(int aValue)
{
lcdAL->display(aValue);
lcdAR->display(100 - aValue);
emit signal_aValueChange(aValue);
}
void RollsRoyceTab::rrValuesHolder(int aValue, int bValue, int cValue)
{
qDebug() << aValue;
qDebug() << bValue;
qDebug() << cValue;
}
和连接(......这个,SLOT(rrValuesHolder(int aValue,int bValue,int cValue)));还是只需要写一个值 SLOT(rrValuesHolder(int aValue)) ?