PDA

View Full Version : A question on preprocessor



Dante
9th July 2009, 20:47
Hi
I read somewhere that the keywords signal and slot(when used in class definition)will be translated to pure c++ by preprocessor.Is it a Qt defined(modified)C++ preprocessor?
thanks

drhex
9th July 2009, 22:28
The words signal and slot are first processed by the standard C++ preprocessor


# define slots
# define signals protected

(from src/corelib/kernel/qobjectdefs.h)

and also by moc (http://doc.qtsoftware.com/4.5/moc.html#moc), which will generate moc_*.cpp-files with the added functionality