[Qt-interest] signals and slots....revisited...

sarvesh saran aquarian.thunder at gmail.com
Sun Mar 13 19:00:34 CET 2011


Hi,

I have been a Qt programmer for quite some time now and i understand most of
the general features of Qt. I am still confused  about how signals and slots
work...

this is what i know (correct me if i am wrong)

   1. slots are like ordinary member functions.however they can be called
   via signals irrespective of their access specifier.
   2. emit is a macro that expands to nothing.
   3. when you write emit mysignal() you are just calling a function called
   mysignal which has been implemented in the generated moc file.
   4. for every object (instantiated from a class containing Q_OBJECT macro
   and inheriting QObject) an addition meta object is instantiated ?
   5. QT stores the names slots and signals of an object in its  meta
   object? in what format.....<name,function pointer> ?
   6. connections between objects are made at runtime...how?? not sure how
   and where a slot is searched for....
   7. but the arguments in the connect call are matched at compile time?
   8. while connecting, only the arguments of the slot is checked...surplus
   arguments are discarded.
   9. SIGNAL and SLOT are macros......not sure what their purpose is....

i tried to look into the generated moc file but things are still murky..any
help will be greatly appreciated.

thanks,
Sarvesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110313/5dbf5eb0/attachment.html 


More information about the Qt-interest-old mailing list