Is there any way to use the signals without MOC and without the connecting via names? My one problem with Qt is that you have something like
this->connect(this->SaveBtn, SIGNAL(click()), SLOT(SaveClicked()));
And there is no error detection to tell that is wrong other then finding out the button doesn’t work or searching through their documentation to find out the signal doesn’t exist. Also it seems pointless and a waste of cycles to connect via names instead of classes.
There is error detection, the
connectfunction returns false when it fails to connect, and a warning is output on standard error (or, on Windows, to the weird place which DebugView reads from). Also you can make these warnings into fatal errors by settingQT_FATAL_WARNINGS=1in your environment.It’s not pointless to connect by name. For example, it means that connections can be established where the signal/slot names are generated at runtime.