The moc tool reads a C++ header file. If it finds one or more class declarations that contain the Q_OBJECT macro, it produces a C++ source file containing the meta-object code for those classes. Among other things, meta-object code is required for the signals and slots mechanism, the run-time type information, and the dynamic property system.
Integrating external/third-party tools in Visual Studio has traditionally been accomplished by means of \"Custom Build\" steps associated to files in the project. The files could be, for example, headers containing Qt macros which must be processed by moc to generate the corresponding meta-object code. In this case, each header file is labeled as a custom build item and will have a custom build property page:
Some constructor are conversion constructors, i.e. it can be used to transform an object of a type provided as argument, into an object of that class. This can sometimes lead to nasty bugs, when the compiler tries to use such a conversion behind the scene in an unexpected way (example). 076b4e4f54