As far as I know and understand how works Qt, the connection lines works on runtime, not in compilation time. This means that all the operations needed to connect a signal and a slot are performed when the code flow reach that part.
Remember something important about Qt, some of the calls are only macros, not C++ functions. For example, the line "Q_OBJECT" you should add in your class declarations to enable the signals and slots mechanims works, is a macro. Also, the connect call is a macro (...), emit is a macro, etc. Those calls expand into real code once MOC (a pre-compiler, translates Qt macros into real code) analize your code.
Also, the signal/slot mechanism, I repeat, as far as I know, works on runtime, not compilation time. If you read the documentation of the connect macro, it says that the "SIGNAL" and "SLOT" macros you place there, convert the stuff you put there into a string, obviously, with some kind of format, that maybe is too complex to used by hand, so, since it is a string working there, the compilation can't check if the string is correct or not, that is checked on runtime.
I hope my bad english let you understand me, and I hope my knowledge is big enough to not being saying (too much) incorrect tinghs.