Hi,

20.04.2017 7:52, Ch'Gans пишет:
On 20 April 2017 at 16:38, Igor Mironchik <igor.mironc...@gmail.com> wrote:
Hi,

What the benefits of qobject_cast<> on simple static_cast<>? Or there is no
qobject_cast
- works only on QObject (obviously)
- returns nullptr if the object cannot be casted to the required type

And it can fail if QObject derived pointer was returned from plugin.

- doesn't relies on RTTI, and is way faster than dynamic cast

This is understandable. But with comparison with static cast there are no benefits?


Chris

one?

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to