Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Moc not run after adding Q_OBJECT macro (VS 2010)
In VS 2010, when a Q_OBJECT macro has been added to a file, moc will not automatically run.
I also found no way to manually "re-moc" the file using the addin's menu.
The best solution so far is removing and re-adding the header file from the solution.
Does anyone know a more convenient way?
You need to run QMake so that it can create a Makefile, which will, in turn, tell moc to run on that file.
How do I run qmake on a VS solution?
I do not know that, I am not using VS. In "normal" qmake projects, qmake needs to be rerun when a Q_OBJECT macro is added to a class.
Ah, that would explain why I couldn't make sense of your suggestion. There is no visible makefile when working with VS. It all happens pretty much behind the scenes of the IDE.