一:在使用connect绑定信号与槽函数时,信号函数只写参数类型,不能带具体的变量名称。比如QLineEdit 有一个信号叫做 void QLineEdit::textChanged(const QString &text).
如果connect这么写就会报错。connect(lineEdit , SIGNAL(textChanged(QString &text)) , this , SLOT(***)); 一定要写成connect(lineEdit , SIGNAL(textChanged(QString )) , this , SLOT(***));