Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Safe to ignore "No matching signal for ..."?
Qt 6.12 LTS is out! See what's new in the release blog

Safe to ignore "No matching signal for ..."?

Scheduled Pinned Locked Moved Solved General and Desktop
19 Posts 5 Posters 5.2k Views
  • 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.
  • L legitnameyo

    The error disappears when I comment out connect() and move the definition of the function that I got in my SLOT, inside connect, to the top in my .h file. When I re-add the connect() inside my .cpp the error is still there HOWEVER the program, just as before, runs smoothly. So again: is it safe to ignore? Is the error just a guideline or is it possible that it will break on another OS? On another OS version? Is it SAFE to ignore? Does anybody know what the error implies?

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #10

    @legitnameyo Did you try to rename the slot?
    Because QMetaObject::connectSlotsByName tells that auto-connect is trying to connect the slot...

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

    1 Reply Last reply
    0
    • JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #11

      @others
      The point is that OP knows he is not following the slot naming convention, he does not wish to, and is asking whether he "can get away with" ignoring the warning.

      @legitnameyo
      Chances are it is just a warning that it cannot find the slot name it expects but you are choosing not to supply, and will work OK, it's your decision. However, I too would not wish to leave a warning in for this. So if I were you I'd have Googled for connectslotsbyname no matching signal and read through the hits to see if there is a way to suppress this if you don't want to follow the naming the convention (most seem to just say "rename your slot", I don't know if any offer how to suppress it).

      1 Reply Last reply
      1
      • L legitnameyo

        The error disappears when I comment out connect() and move the definition of the function that I got in my SLOT, inside connect, to the top in my .h file. When I re-add the connect() inside my .cpp the error is still there HOWEVER the program, just as before, runs smoothly. So again: is it safe to ignore? Is the error just a guideline or is it possible that it will break on another OS? On another OS version? Is it SAFE to ignore? Does anybody know what the error implies?

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #12

        @legitnameyo

        you create_new_button is suspiciously close to what the connectSlotsByName is looking for void on_<object name>_<signal name>(<signal parameters>); it shouldn't trigger as the first part is wrong. But maybe ?

        What version of Qt are you using?

        also try a complete rebuild. If you added slot from the designer and manually removed the generated code. the moc file will be wrong and will cause all kinds of warning/issues


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        1
        • L Offline
          L Offline
          legitnameyo
          wrote on last edited by
          #13

          Qt Creator 4.8.1
          Based on Qt 5.12.0 (Clang 10.0 (Apple), 64 bit)
          on a MacBook Air (13-inch, Early 2014) running macOS Mojave 10.14.

          I've added everything in the code, nothing in the actual UI designer of Qt Creator.

          @JonB gets the point! From what I've googled it seems as if there should be no performance issues from not following the conventional signal slot style. Some people say it COULD break and/or give performance issues but nobody seems to have actually tried it out or experienced any issues that are noticeable. I'll set the thread as solved since nobody experiences issues and I'll just make the assumption that it's up to me to follow conventional styling or not. Thanks!

          J.HilkJ 1 Reply Last reply
          1
          • L legitnameyo

            Qt Creator 4.8.1
            Based on Qt 5.12.0 (Clang 10.0 (Apple), 64 bit)
            on a MacBook Air (13-inch, Early 2014) running macOS Mojave 10.14.

            I've added everything in the code, nothing in the actual UI designer of Qt Creator.

            @JonB gets the point! From what I've googled it seems as if there should be no performance issues from not following the conventional signal slot style. Some people say it COULD break and/or give performance issues but nobody seems to have actually tried it out or experienced any issues that are noticeable. I'll set the thread as solved since nobody experiences issues and I'll just make the assumption that it's up to me to follow conventional styling or not. Thanks!

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #14

            @legitnameyo said in Safe to ignore "No matching signal for ..."?:

            Qt Creator 4.8.1
            Based on Qt 5.12.0 (Clang 10.0 (Apple), 64 bit)

            A common enough mistake, that is the version of QtCreator not necessarily the same as the one you're using for your project


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              legitnameyo
              wrote on last edited by
              #15

              True. I gleaned in the build settings and it looks as if I'm using

              Desktop Qt 5.12.1 clang 64bit
              
              J.HilkJ 1 Reply Last reply
              0
              • L legitnameyo

                True. I gleaned in the build settings and it looks as if I'm using

                Desktop Qt 5.12.1 clang 64bit
                
                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by J.Hilk
                #16

                @legitnameyo alright, wouldn't surprise me if there's a bug in 5.12.0 or 5.12.1 .
                The 5.12 release was way too bumpy in my opinion.

                Maybe worth a try to update to 5.12.3, if you want to invest the time downloading the precompiled libs.


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  legitnameyo
                  wrote on last edited by
                  #17

                  In my experience, on macOS Mojave 10.14, there are some clashes and bugs between newer versions of Qt and the OS so I won't try to update. I don't want to run the risk of spending a few hours upgrading and then possibly downgrading as well as reinstalling stuff.

                  I don't experience and I don't see other people experiencing performance issues with this error, so I won't try anything unless somebody comes out and explicitly says there are performance issues or possible breaks on other OS's.

                  J.HilkJ 1 Reply Last reply
                  0
                  • L legitnameyo

                    In my experience, on macOS Mojave 10.14, there are some clashes and bugs between newer versions of Qt and the OS so I won't try to update. I don't want to run the risk of spending a few hours upgrading and then possibly downgrading as well as reinstalling stuff.

                    I don't experience and I don't see other people experiencing performance issues with this error, so I won't try anything unless somebody comes out and explicitly says there are performance issues or possible breaks on other OS's.

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #18

                    @legitnameyo you can have multiple versions of Qt on your system in parallel and you can easily switch between them via the "kit selection" inside QtCreator


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      legitnameyo
                      wrote on last edited by
                      #19

                      That's a really neat feature! I'll try it out some time in the future but for now I think the thread is done. The explicit and concrete answer to my question won't come from a new version but rather from an analysis of the source code of Qt (or possibly tests on different computers and OS's). Thanks anyways!

                      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
                      • Unsolved