dimanche 19 août 2018

QT connect a SIGNAL with fewer arguments than SLOT

I have this code:

QObject::connect(lineEdit_1, SIGNAL(textChanged(const QString &)), MainWindow, SLOT(myMethod(const QString &, QLineEdit* )) );

This code works correctly when myMethod has only the first argument (equal to the SIGNAL) but I need to pass a pointer lo lineEdit_1 in order to allow myMethod to know on which LineEdit it has to operate. What I should to do?

Thanks a lot.

Aucun commentaire:

Enregistrer un commentaire