Subnavigation

Boost signals & slots with Qt

The problem in brief: Trolltech invented signals & slots, Boost implemented the concept using plain templates, and ironically you couldn't easily combine both libraries because of a relatively simple name clash. Trolltech used macro keywords and Boost loved our naming so much that they picked the same terms => clash. Off topic, I like that they took our naming, it's a bit of a pity recent implementations done by other parties call the very same concept events and delegates.

Anyway, with "CONFIG += no_keywords" we have solved the name clash in Qt 4.1, released in December 2005.

Scott Collins now let me know, that the May update of the Boost libraries has an updated Boost.Signals FAQ with respect to Qt that describes the technique. Have a look at http://boost.org/doc/html/signals/s04.html. It explains how to use Boost signals & slots in Qt applications, and also references Scott's own article, "A Deeper Look at Signals and Slots".

Update Monday, 30 June 2008: The links appear to be dead by now. No alternative links known to me, sorry, but way back can help: http://web.archive.org/web/20070703100120/http://scottcollins.net/articles/a-deeper-look-at-signals-and-slots.html


Blog Topics:

Comments