1 2 3 4 5 6 7 8
#include <QtCore/QObject> struct MyObj : public QObject {}; void testQObjectCast(QObject *o) { dynamic_cast<MyObj*>(o); // Warn }