Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Incompatible sender/receiver arguments

Hello veryone Please, help me to solve this probleme…

File.h

public slots:
void Manage_User_Connexion(QString UserName, QString Password);

file.cpp

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

   QObject::connect(PbLogin,SIGNAL(clicked()),this,SLOT(Manage_User_Connexion(QString,QString)));

And I get this error: Incompatible sender/receiver arguments

Thank for your helping

>Solution :

Signal clicked() probably does not have any arguments. So you cannot connect it to a slot which expects two QString arguments. The arguments passed to signal when it is emitted are supposed to be passed to the slot. If the arguments are not compatible, then this cannot be done. You need to redesign your code, you probably should read more about the purpose of signals and slots mechanism because you probably do not fully understand how they work and what they are used for.

Without seeing more of your code we cannot help you find any solution.

PS: Do not use old Qt4 style of connections. Use new Qt5 style of connections, see https://wiki.qt.io/New_Signal_Slot_Syntax

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading