Lets say I have a two classes:
class A : public QObject {};
class B : public QObject {};
then I go
QObject *a = new A();
QObject *b = new B();
now, how do I make sure that "a" is an instance of class A, and "b" is an instance of class B?
currently I do something like this:
if (a->inherits(A::staticMetaObject.className())) {
...
} else if (a->inherits(A::staticMetaObject.className())) {
...
is there a better way?