简体   繁体   English

是否可以看到Q_SIGNALS,Q_SLOT,SLOT(),SIGNAL()宏的定义? (QT)

[英]Is it possible to see definition of Q_SIGNALS, Q_SLOT, SLOT(), SIGNAL() macros? (Qt)

Is it possible to see definition of Q_SIGNALS, Q_SLOT, SLOT(), SIGNAL() macros in Qt framework? 是否有可能在Qt框架中看到Q_SIGNALS,Q_SLOT,SLOT(),SIGNAL()宏的定义?

PS Google gave me nothing in this question. PS Google在这个问题上没有给我任何帮助。

Form qobjectdefs.h , for a non-debug compilation: 表单qobjectdefs.h ,用于非调试编译:

#define Q_SLOTS
#define Q_SIGNALS   protected
#define SLOT(a)     "1"#a
#define SIGNAL(a)   "2"#a

The Q_SLOTS and Q_SIGNALS declarations are only treated specially by the moc run, in the final compilation they reduce to simple method declarations. Q_SLOTSQ_SIGNALS声明仅由moc运行专门处理,在最终编译中它们简化为简单方法声明。 SIGNAL() and SLOT() create names from the provided signatures. SIGNAL()SLOT()从提供的签名中创建名称。

With visual studio - right click the identifier you're interested in and choose "Go To Definition" or press F12. 使用visual studio - 右键单击​​您感兴趣的标识符,然后选择“转到定义”或按F12。
If you have Visual Assist, this can also be done with Alt+G when the VS mechanism doesn't work so well. 如果你有Visual Assist,当VS机制不能正常工作时,也可以用Alt + G完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM