I know how they work conceptually, but how are signals and slots implemented in the Qt framework? Qt Creator treats them as keywords, but are they simply a set of macros, or is a special pre-processor required before these source files can be compiled?
In other words, if I use Qt's signal/slot features in my code, can I easily compile it on any C++ compiler?
Many features of Qt, including signals, require preprocessing the source using the Qt Meta-Object Compiler (MOC).
If you use Qt's signals feature, you can compile your source code on any compiler and platform that is supported by Qt. If you need to compile on a platform not supported by Qt, you may be out of luck or at least in for a lot of fun integration work (this is true of any library or framework, of course).
If you are looking for a cross-platform signals implementation, you might also consider Boost.Signals.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With