三个地方:
第一:声明控件,比如一个combox
QComboBox *shapeComboBox;
第二:声明一个此combox需要关联的事件
private slots:
void shapeChanged();
第三:关联
connect(shapeComboBox, SIGNAL(activated(int)),
this, SLOT(shapeChanged()));
其中触发该事件的信号为:SIGNAL(activated(int)