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. Qt 5.7 moc file missing
Qt 6.11 is out! See what's new in the release blog

Qt 5.7 moc file missing

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 6 Posters 3.2k 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.
  • G Offline
    G Offline
    gabor53
    wrote on last edited by
    #1

    Hi,
    I rebuilt my project and I noticed that there are no moc files were generated and as a result I get tons of error messages. I already ran clean project, rebuild project and qmake but nothing happened. How to fix this?
    Thank you for your help.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gabor53
      wrote on last edited by
      #2

      The class declaration looks like this:

      namespace Ui
      {
      class Additem;
      }
      
      class Additem : public QDialog
      {
          Q_OBJECT
      
      public:
          explicit Additem(QWidget *parent = 0);
          ~Additem();
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        You should add which version of Qt you are using, your platform and compiler.

        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
        • G Offline
          G Offline
          gabor53
          wrote on last edited by
          #4

          Qt 5.7.0., Windows 10, MinGW_32

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gabor53
            wrote on last edited by
            #5

            Now I also receive an error message:
            "C:\Programming\Projects\Folkfriends_1_0\additem.cpp:75: error: no matching function for call to 'Additem::connect(QLineEdit*&, const char*, Additem*, const char*)'
            connect(ui->LineEdit_Name, SIGNAL(editingFinished()),this, SLOT(readAndValidate ()));"

            I get the same error message for all Signals and Slots. They all worked yesterday.

            1 Reply Last reply
            0
            • jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Did you try to delete the build directory and do a complete rebuild (after running qmake)?

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

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gabor53
                wrote on last edited by
                #7

                Yes but it didn't work. It happens only with this project.

                1 Reply Last reply
                0
                • hskoglundH Offline
                  hskoglundH Offline
                  hskoglund
                  wrote on last edited by
                  #8

                  Hi, perhaps your Windows 10 was updated yesterday?

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    gabor53
                    wrote on last edited by
                    #9

                    No. There was no update for it yesterday.

                    1 Reply Last reply
                    0
                    • joaopagottoJ Offline
                      joaopagottoJ Offline
                      joaopagotto
                      wrote on last edited by
                      #10

                      Try deleting the directory build_** generated by the compiler , and try to compile again ...

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        gabor53
                        wrote on last edited by
                        #11

                        I already deleted build but nothing changed when I rebuilt it.

                        1 Reply Last reply
                        0
                        • VRoninV Offline
                          VRoninV Offline
                          VRonin
                          wrote on last edited by
                          #12

                          did you try running moc.exe on your .h files manually?

                          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                          ~Napoleon Bonaparte

                          On a crusade to banish setIndexWidget() from the holy land of Qt

                          G 1 Reply Last reply
                          0
                          • VRoninV VRonin

                            did you try running moc.exe on your .h files manually?

                            G Offline
                            G Offline
                            gabor53
                            wrote on last edited by
                            #13

                            @VRonin
                            How to run them manually on them?

                            G 1 Reply Last reply
                            0
                            • G gabor53

                              @VRonin
                              How to run them manually on them?

                              G Offline
                              G Offline
                              gabor53
                              wrote on last edited by
                              #14

                              @gabor53
                              The problem was a function I managed to name void connect() which clearly clashed with signals and slots.

                              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