---

Signal me and I’ll slot you in

There is a need in many program languages to respond to asyncronous events. In other words things happen out of order, just like in my life where my money is spent before I earn it 🙂

Usually these sort of events are handled by what is called an event handler (duh!) where a message is posted and a function is called to respond to that message. Just not in the way I respond to bill collectors knocking at my door……I hope.

These functions which are called are generally described as, er, callback functions and are identified to the event handler by a pointer, which is simply an address in memory where the function can be found. Not unlike the little kid pointing me out to the policeman while I am hiding in the bushes at the hot neighbours house o_0

By now you are probably thinking I am some sort of escaped convict. I assure you I am not…in the country I am now residing anyway 😀 I have escaped however, from the confusing and error prone land of callback functions with the use of Qt’s signal and slot methods.

Complete Story