Why is RTTI bad? (dynamic_cast <-> qobject_cast)

Viewed 185

The Qt documentation says the following:

The qobject_cast() function behaves similarly to the standard C++ dynamic_cast(), with the advantages that it doesn't require RTTI support and it works across dynamic library boundaries.

Why is it better to use qobject_cast over dynamic_cast, what's wrong with RTTI? Should I always prefer to use qobject_cast when I'm dealing with QObject inherited objects?

0 Answers
Related