16,216
社区成员
发帖
与我相关
我的任务
分享
bool QObject::connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * method, Qt::ConnectionType type = Qt::AutoConnection )
for(int i = 0; i< MAXNUM ;i++)
spinBox = new QSpinBox[MAXNUM];
spinBoxSpd = new QSpinBox[MAXNUM];
{
connect(slider+i,SIGNAL(valueChanged(int)),spinBox+i,SLOT(setValue(int)));
connect(spinBox+i,SIGNAL(valueChanged(int)),slider+i,SLOT(setValue(int)));
connect(spinBox+i,SIGNAL(valueChanged(int)),this,SLOT(setmySliderData(int)));
connect(spinBoxSpd+i,SIGNAL(valueChanged(int)),SLOT(updateSpeed(int)));
}
spinBox = new QSpinBox[MAXNUM];
spinBoxSpd = new QSpinBox[MAXNUM];
for(int i = 0; i< MAXNUM ;i++)
{
connect(slider+i,SIGNAL(valueChanged(int)),spinBox+i,SLOT(setValue(int)));
connect(spinBox+i,SIGNAL(valueChanged(int)),slider+i,SLOT(setValue(int)));
connect(spinBox+i,SIGNAL(valueChanged(int)),this,SLOT(setmySliderData(int)));
connect(spinBoxSpd+i,SIGNAL(valueChanged(int)),SLOT(updateSpeed(int)));
}