int MyWindow::OnTextType()
{
QObject::connect(textEdit, SIGNAL(textChanged()), lineEdit, SLOT(getLength()));
return 1;
}
int MyWindow::getLength()
{
lineEdit->setText("abc");
return 1;
}
这是我的代码 可以运行 但是他会提示说
Object::connect: No such slot MyWindow::getLength()
就是说没有这个slot咯..而且不知道怎么自定义slot 我只是想在编写一段文本的同时同时也能统计字数并输入到lineEdit里
希望帮忙了 谢谢