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. [Solved] error: [debug/moc_mainwindow.cpp] Error 1
Forum Updated to NodeBB v4.3 + New Features

[Solved] error: [debug/moc_mainwindow.cpp] Error 1

Scheduled Pinned Locked Moved General and Desktop
16 Posts 7 Posters 62.5k 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.
  • S Offline
    S Offline
    szh1
    wrote on last edited by
    #7

    [removed]

    I don't see anything wrong with it. It built fine until today. I just moved the project to a different location on my hard drive.

    I remember having this problem once, but I don't remember how I fixed it.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #8

      Try to remove .pro.user file at new location and open project again in QtCreator.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        szh1
        wrote on last edited by
        #9

        I tried that. Same.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          szh1
          wrote on last edited by
          #10

          I just uninstalled and reinstalled the Qt SDK, but it didn't change anything. I also tried copying the files again, even to a different place. It is still not building.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            szh1
            wrote on last edited by
            #11

            I created a new empty project, imported the old files, and now it's working!

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vinurocks
              wrote on last edited by
              #12

              Your Build directory path must not contain spaces.. In your case `C:/My Dropbox/Extreme Image Converter/ExtremeImageConverter-build-desktop’ contains spaces..

              1 Reply Last reply
              0
              • MarcosADM Offline
                MarcosADM Offline
                MarcosAD
                wrote on last edited by
                #13

                @szh1 said:

                [debug/moc_mainwindow.cpp] Error 1

                I know this is a very old post but I've just bumped into it. This could be helpful.
                This kind of errors:
                [debug/moc_mainwindow.cpp] Error 1
                [debug/moc_*cpp] Error 1

                might come when declaring class data members in the slots / signals section by mistake.

                M 1 Reply Last reply
                7
                • omertO Offline
                  omertO Offline
                  omert
                  wrote on last edited by
                  #14

                  Remove your file from project (not permanently) than add again with "Add Existing Files"

                  1 Reply Last reply
                  0
                  • MarcosADM MarcosAD

                    @szh1 said:

                    [debug/moc_mainwindow.cpp] Error 1

                    I know this is a very old post but I've just bumped into it. This could be helpful.
                    This kind of errors:
                    [debug/moc_mainwindow.cpp] Error 1
                    [debug/moc_*cpp] Error 1

                    might come when declaring class data members in the slots / signals section by mistake.

                    M Offline
                    M Offline
                    Mohammad Kanan
                    wrote on last edited by
                    #15
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      eximus
                      wrote on last edited by eximus
                      #16

                      @MarcosAD said in [Solved] error: [debug/moc_mainwindow.cpp] Error 1:

                      I know this is a very old post but I've just bumped into it. This could be helpful.
                      This kind of errors:
                      [debug/moc_mainwindow.cpp] Error 1
                      [debug/moc_*cpp] Error 1
                      might come when declaring class data members in the slots / signals section by mistake.

                      In my case I've got the same error: I use enum members of 3.h file in 1.cpp file, the 3.h file wasn't included into 1.cpp file (and no warning from Qt Creator 12.3.1). Also, when I have the same enum in 1.h and in 3.h files and use it in 1.cpp file.

                      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