ettrich
Qt
Posted by ettrich
 in Qt
 on Friday, June 15, 2007 @ 13:27

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

One Response to “Boost signals & slots with Qt”

» Posted by jamadagni
 on Tuesday, June 26, 2007 @ 13:03

Hello. The boost.signals FAQ which you point to says that it is possible to switch off the Qt keywords on a per-project or per-file basis. While per-project is right, I don’t understand how it is possible to switch it off for a single file unless that single file is in a separate folder with a separate pro file, or… I’m confused. Please tell me how it is possible to do for per-file?

Thanks.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.