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. No matching signal for ...[SOLVED]
Forum Updated to NodeBB v4.3 + New Features

No matching signal for ...[SOLVED]

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 17.2k Views 1 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.
  • K Offline
    K Offline
    karim24
    wrote on last edited by
    #1

    in the mainwindow constructor:
    @ connect( ui->projectsTabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT(on_close_tab(int)));
    @

    in the mainwindow header file:
    @void on_close_tab(int);@

    in the mainwindow .cpp
    @void MainWindow::on_close_tab(int i)
    {
    qDebug()<<"close requested....";
    }@

    the thing is it works fine,whenever the data changes, the slot excutes,but i still get this :
    QMetaObject::connectSlotsByName: No matching signal for on_close_tab(int)
    and i'm just wondering why ,or maybe i'm doing it wrong

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

      Hi,

      Somewhere there's a call to "connectSlotsByName":http://qt-project.org/doc/qt-4.8/qmetaobject.html#connectSlotsByName and your slot doesn't follow the signature style to be used with connectSlotsByName

      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
      0
      • K Offline
        K Offline
        karim24
        wrote on last edited by
        #3

        hi
        the thing is my code doesn't contain this function at all "connectSlotsByName" ,and i never used such a function,
        maybe "connect" is calling it or the IDE is calling it somewhere else
        but the code is running fine,so is there anything i should be concerned about

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          AFAIK connectSlotsByName is probably introduced through moc.

          I am using in one of my applications the feature, but do not call connectSlotsByName IIRC.

          It could be triggered in your case by the name of the slot (presumably "on_" starts are the triggers). Change the slot to something else and see, if the warning disappears.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          2
          • K Offline
            K Offline
            karim24
            wrote on last edited by
            #5

            hi thanks for your replies
            @koahing,yes when i delete "on_" the warnning disapears

            R 1 Reply Last reply
            3
            • K karim24

              hi thanks for your replies
              @koahing,yes when i delete "on_" the warnning disapears

              R Offline
              R Offline
              Renan
              wrote on last edited by
              #6

              @karim24 thanks for the topic! It helps me as well. I removed the on_* from the beggining of the signals and slots names and the warnings disappear. Cheers.

              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