I am trying to connect a signal to a signal using the new syntax:
connect(ui->line,&QLineEdit::returnPressed,ui->button,&QPushButton::clicked);
But the compiler throws an error, with all this the old syntax works:
connect(ui->line,SIGNAL(returnPressed()),ui->button,SIGNAL(clicked()));
I know this can be connected to function click:
connect(ui->line,&QLineEdit::returnPressed,ui->button,&QPushButton::click);
But is there a way to connect it to the signal use new syntax?