Important: Please read the Qt Code of Conduct -

Qt 4.8.3, signal and slot connections

  • I'm using an older version of Qt for a project where I currently cannot use a later version because the SDK that issues uses this old version.

    Anyway....I have to connect signals and slots, my system has Qt version 5.12 and I'm trying to transfer some code from that system to the older version.

    My connection looks like this:


    Both systemBattery signals and slots have the exact same prototype:

        void systemBattery(int intBattery);

    When I build the project using the older Qt version I get:

        no matching function for call to 'clsMainWnd::connection(clsMainWnd* const,const char*,clsDisplaySettings*&,const char*)'

    How do I implement this using what is available in the older version?

    I've also tried:


    I got the same message.

  • Lifetime Qt Champion

    You can't use the new signal/slot syntax with Qt4.

  • Lifetime Qt Champion

    Why do you delete your post? The problem may have others too but now nobody can find the answer because you deleted your post...

  • I have and it works, the reason it didn't work was because I forgot to add QObject and Q_OBJECT to the slot class definition.

    Once I did that the warnings went away. Just to be clear I used the later connect method in my post which works fine.

  • @SPlatten it seems you was able to solve your issue. If so please don't forget to mark your post as such. Thanks

Log in to reply