Mistake:

//transport.cpp:67: error: 'muttrc_switch' was not declared in this scope emit muttrc_switch(); ^ class Transport : public QObject { Q_OBJECT public: explicit Transport(QObject *parent = 0); QString transport(QString, QString); signals: void muttrc_switch (); }; Transport::Transport(QObject *parent) : QObject(parent) {} QString transport(QString email, QString file) { ConfigMuttrc mutrc; Transport mutrc_s; QObject::connect(&mutrc_s, SIGNAL (muttrc_switch ()), &mutrc, SLOT (muttrc_config ())); emit mutrc_s.muttrc_switch(); } 

What am I doing wrong?

  • Incorrect signature of the transport function: QString Transport::transport(QString email, QString file) - Pavel Parshin
  • Thank you for your reply. Please send me an answer, I will be credited. - shaman888

1 answer 1

Forgot to specify the scope of the class in the function signature:

 QString Transport::transport(QString email, QString file)