connect()声明如下例, connect(sender, SIGNAL(signal), receiver, SLOT(slot)); 一个信号可以连到多个槽函数 connect(slider, SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int))); connect(slider, SIGNAL(valueChanged(int)), this, SLOT(updateStatusBarIndicator(int))); 多个信号可以连到单个槽函数 connect(lcd, SIGNAL(overflow()), this, SLOT(handleMathError())); connect(calculator, SIGNAL(divisionByZero()), this, SLOT(handleMathError()));