Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Signal isn't recognized after connecting it to a slot
Forum Updated to NodeBB v4.3 + New Features

Signal isn't recognized after connecting it to a slot

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
13 Posts 3 Posters 316 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.
  • Christian EhrlicherC Offline
    Christian EhrlicherC Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote last edited by
    #4

    And where is StartTimeStepTimer() called?
    Please provide a minimal, compilable example to reproduce your problem.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    1 Reply Last reply
    1
    • J Offline
      J Offline
      Jay_emissary
      wrote last edited by
      #5

      I'm sorry, but now that you've mentioned it and after taking another look at my code, I think the problem lies within the fact that I forgot to call StartTimeStepTimer in the initializer class, my bad. I would test to verify that, but unfortunately, I've come across another issue, and I can't compile without fixing it first. I haven't done anything to my project to cause an error like this, so I'm not sure what I can do to fix it... I've already tried reinstalling Qt Creator, but I can't seem to shake the error. Are you familiar with anything like this?

      image.png

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jay_emissary
        wrote last edited by Jay_emissary
        #6

        As far as I know, the error from the image stems from the QGuiApplication file, which I've never touched. This one error is causing a domino effect, leading to about a hundred other ambiguous errors. Strangely, it's specific to this project, despite the fact that I haven't added anything to warrant an error like this. I've also tried cleaning and rebuilding the project from the IDE, but that also doesn't help. If I could get some help with this, I'd be ever so grateful.

        gameinitializer.h:3:10: In included file: no member named 'clock_t' in the global namespace; did you mean 'clockid_t'?
        ctime:60:11: error occurred here
        pthread.h:382:13: 'clockid_t' declared he

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jay_emissary
          wrote last edited by
          #7

          I've just realized that the image I sent can be a little misleading, so I have a couple of other images, proving that the error doesn't just come from the game initializer class; no matter where I go in the project. The error always shows up somewhere at the top.

          image.png
          image.png

          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote last edited by
            #8

            Show the relevant header, maybe you added a using namespace or forgot the ; at the end of the class.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            J 1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              Show the relevant header, maybe you added a using namespace or forgot the ; at the end of the class.

              J Offline
              J Offline
              Jay_emissary
              wrote last edited by Jay_emissary
              #9

              @Christian-Ehrlicher That's my problem. Because the error points to many different header files, it's hard to tell which one is truly relevant. Excuse me for using images, but there's too much code here, and because I'm a new user, Qt flags my posts as spam if there are too many characters.

              All the errors point to this file, which I never touch (it's engine related)
              e9a20f36-f82e-4adc-8c64-1dbf6d5071d9-image.png !

              the error that always appears at the top points to the engine-related header files in my project...
              d01a0973-4d90-4fb5-b459-285926244f51-image.png

              d006426d-cea6-4930-9ffb-71a5759cdab3-image.png

              1 Reply Last reply
              0
              • Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote last edited by
                #10

                Start over with a simple main.cpp

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                J 1 Reply Last reply
                2
                • J Jay_emissary has marked this topic as solved
                • Christian EhrlicherC Christian Ehrlicher

                  Start over with a simple main.cpp

                  J Offline
                  J Offline
                  Jay_emissary
                  wrote last edited by
                  #11

                  @Christian-Ehrlicher
                  Hey, so after a bit of research yesterday, I found that when you have a file names time.cpp/time.h in your project, Qt gets confused and throws this exact error. The files didn't show up in my Qt project manager, so I didn't realize that they were for some reason in my project, but as I was moving my files to a clean project like you suggested, I found that both time.cpp and time.h were sitting in my project files! I removed them and it worked perfectly. Thank you so much for the recommendation!

                  here's the stack overflow page I was reading yesterday
                  https://stackoverflow.com/questions/43813563/clock-t-and-clock-in-does-not-declared-in-this-scope-in-qt

                  1 Reply Last reply
                  0
                  • Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote last edited by
                    #12

                    This has nothing to do with Qt - you must not use a filename which is also used by the c or c++ system headers which you did.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    J 1 Reply Last reply
                    0
                    • Christian EhrlicherC Christian Ehrlicher

                      This has nothing to do with Qt - you must not use a filename which is also used by the c or c++ system headers which you did.

                      J Offline
                      J Offline
                      Jay_emissary
                      wrote last edited by
                      #13

                      @Christian-Ehrlicher Noted.

                      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