bool QObject::connect ( const QObject * sender, const char * signal, const char * member ) const
现有QPushButton共N个,对象名为pushButton_001,pushButton_002,pushButton_003……pushButton_N
我想把他们都连到同一个槽上,要写N遍connect么……有没有快速方法?
connect(pushButton_001, SINGAL(clicked()), this, SLOT(mySlot()));
connect(pushButton_002, SINGAL(clicked()), this, SLOT(mySlot()));
connect(pushButton_003, SINGAL(clicked()), this, SLOT(mySlot()));
……
connect(pushButton_N, SINGAL(clicked()), this, SLOT(mySlot()));
这样真的很痛苦吖……