简体   繁体   中英

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?

PS Google gave me nothing in this question.

Form qobjectdefs.h , for a non-debug compilation:

#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. SIGNAL() and SLOT() create names from the provided signatures.

With visual studio - right click the identifier you're interested in and choose "Go To Definition" or press F12.
If you have Visual Assist, this can also be done with Alt+G when the VS mechanism doesn't work so well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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