qt的assistant解释:
Q_SIGNALS
Use this macro to replace the signals keyword in class declarations, when you want to use Qt Signals and Slots with a 3rd party signal/slot mechanism.
The macro is normally used when no_keywords is specified with the CONFIG variable in the .pro file, but it can be used even when no_keywords is not specified.
Q_SLOTS
Use this macro to replace the slots keyword in class declarations, when you want to use Qt Signals and Slots with a 3rd party signal/slot mechanism.
The macro is normally used when no_keywords is specified with the CONFIG variable in the .pro file, but it can be used even when no_keywords is not specified.
如果你qt项目使用了第三方库,导致signals和slots成为关键字,则使用上面的宏Q_SIGNALS、Q_SLOTS来替代signals和slots。如果你的pro里加了CONFIG+=no_keywords,则强制使用上面的宏。