Boost logo

Boost :

From: Simon Buchan (simon_at_[hidden])
Date: 2005-09-23 02:46:11


Vladimir Prus wrote:
> Simon Buchan wrote:
>
>
>>Vladimir Prus wrote:
>>
>>>Hi,
>>>just came across this blog post:
>>>
>>>
>
> http://scottcollins.net/blog/2005/09/question-for-other-boost-users.html
>
>>>It's from a person affiliated with Trolltech (makers of Qt), and raises a
>>>question how Boost.Signals and Qt can be made to better work together.
>>>
>
>
>>See Boost.Signals FAQ #3:
>>
>>3. How do I get Boost.Signals to work with Qt?
>>When building with Qt, the Moc keywords signals and slots are defined
>>using preprocessor macros, causing programs using Boost.Signals and Qt
>>together to fail to compile.
>
>
> Note that the author of the blog post explicitly mentions this FAQ item. Did
> you read the post at all?
>
> - Volodya
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
Actually, he mentions a sentence inside the FAQ, and seems to ignore the
rest of it. Did you notice that the FAQ Item was explicitly about
working with Qt? And that the library is carefully designed to not be
clobbered by the Qt preprocceser? (signals is only used for the
namespace name, and slot(s) is never used, only slot_type).
Simply put '#define BOOST_SIGNALS_NAMESPACE whatever' before '#include
<boost/signal.hpp>' and everything works nicely.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk