Lets say I have a two classes:
class A : public QObject {}; class B : public QObject {};
then I go
QObject *a = new A(); QObje
You can use qobject_cast(instance) on QObject derived classes and check the return value. If instance cannot be cast to MyClass*, the return value will be NULL.
qobject_cast(instance)
instance
MyClass*