Hi could anyone give me a simple reference to function pointers and callback functions in qt?
are signal slots and callback functions different from each other?
thanks!
Hi could anyone give me a simple reference to function pointers and callback functions in qt?
are signal slots and callback functions different from each other?
thanks!
Signal slots are different from function pointers in the way it has been implemented. Although the purpose of both of 'em is the same.
Signal slots are easier to understand and implement. If you are largely using qt classes, it proves very helpful. However, it is slower than the function pointers as there are a few extra function calls.
The speed however is immaterial in most of the cases because the percentage gain of using function pointers in most cases is not significant.
ehnuh (7th November 2012)
Signals and Slots are built on top of callback concept, with added features like type safety, signal-to-signal, multi-slots, and cross-thread etc. At the core both Signals and Slots are plain C++ funcation calls (member functions)are signal slots and callback functions different from each other?
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
ehnuh (7th November 2012)
Bookmarks