1

Most of my classes generate a moc_<CLASS>.cpp file. Why do some classes generate a <CLASS>.moc file instead of/as well as?

sam-w
  • 7,478
  • 1
  • 47
  • 77

1 Answers1

2

<CLASS>.moc is generated wherever there is a need to MOC the source file as well as/instead of the header (i.e. if the Q_OBJECT macro is used in the source).

See this answer for how this can be achieved.

Community
  • 1
  • 1
sam-w
  • 7,478
  • 1
  • 47
  • 77