Important: Please read the Qt Code of Conduct -

Persistant moc file in visual studio

  • Hi
    I am using Visual Studio 2012 with the Qt addin
    I have a class that used to derive from QObject and declared the Q_OBJECT macro
    Now I have decided that I no longer need to derive from QObject so I rewrote the class, however, now when I rebuild the project I get an error message stating that Debug\moc_MyClass.cpp cannot be found.

    I have cleaned the project and deleted a generated files but to no avail

    Has anyone come across this before and if so how to overcome the problem


  • Moderators

    i guess you also have to remove it from the project manually.
    May be a bug in the Qt addin.

Log in to reply