//例如这样:
connect(btn1,SIGNAL(clicked()),this,SLOT(getText1()));
connect(btn2,SIGNAL(clicked())...,this,SLOT(getText2()));
connect(btn3,SIGNAL(clicked()),this,SLOT(getText3()));
connect(btn4,...SIGNAL(clicked()),this,SLOT(getText4()));
connect(btn5,SIGNAL(clicked()),this,SLOT(getText5()));...//然后再去实现getText1,getText2,getText3,getText4,getText5
其实五个槽函数里面的业务逻辑,只是输出对于的人名,可以说是一个业务逻辑,现在却需要五个函数,函数的作用就是为了解重复代码...}
connect(myMapper, SIGNAL(mapped(int)), this, SLOT(getText(int)));
//然后我们编写getText(int)这个槽函数即可
void