signal & slot
The Qt signals/slots and property system are based on the ability to introspect the objects at runtime. C++ does not offer introspection support natively, so Qt comes with a tool to provide it. That tool is MOC. It parses the header files and generates an additional C++ file that is compiled with the rest of the program (1) signals, slots fucntion are simple functions, but MOC will see them (2) Q_OBJECT defines a bunch of functions and a static QMetaObject , all signals/connections are stored here we can get the deatails about it from https://woboq.com/blog/how-qt-signals-slots-work.html