CodePudding user response:
Moc is "meta object" compiler, Qt application in to the standard c + + compiler to use moc before precompiled analysis source file, if there is a macro Q_OBJECT, generate a c + + source files with the realization of the Q_OBJECT macro code, newly generated source files involved in the standard compiler to compile, if you can't find in the process of compiling the corresponding moc file link errors will occur and at this point to add on the corresponding moc documents;