Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Same Error: No matching function for call to QObject::Connect...
Forum Updated to NodeBB v4.3 + New Features

Same Error: No matching function for call to QObject::Connect...

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TMahoney1979
    wrote on last edited by
    #1

    Re: No matching function for call to QObject::connect

    Same Error Here.

    My code is straight out of the online tutorial...

    QObject::connect(quitbutton, SIGNAL(clicked()), app, SLOT(quit()));

    Adding the "config" line has no effect.

    jsulmJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt ?
      On what OS ?
      What compiler ?
      What is the exact error message ?
      Where exactly in your code ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • T TMahoney1979

        Re: No matching function for call to QObject::connect

        Same Error Here.

        My code is straight out of the online tutorial...

        QObject::connect(quitbutton, SIGNAL(clicked()), app, SLOT(quit()));

        Adding the "config" line has no effect.

        jsulmJ Online
        jsulmJ Online
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @TMahoney1979 said in Same Error: No matching function for call to QObject::Connect...:

        QObject::connect(quitbutton, SIGNAL(clicked()), app, SLOT(quit()));

        Try

        QObject::connect(quitbutton, SIGNAL(clicked()), &app, SLOT(quit()));
        

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        T 1 Reply Last reply
        3
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          quitbutton - is it stack object or pointer of an object ? If stack object pass the the address like &quitbutton.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          3
          • jsulmJ jsulm

            @TMahoney1979 said in Same Error: No matching function for call to QObject::Connect...:

            QObject::connect(quitbutton, SIGNAL(clicked()), app, SLOT(quit()));

            Try

            QObject::connect(quitbutton, SIGNAL(clicked()), &app, SLOT(quit()));
            
            T Offline
            T Offline
            TMahoney1979
            wrote on last edited by
            #5

            Thanks, @jsulm. The "&app" worked perfectly.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved