void SomeClass::someSlot(){ QObject *obj = sender(); if (!obj) return; if (qobject_cast<QAction *>(obj)) { <do_something with QAction> return; } if (qobject_cast<QPushButton *>(obj)) { <do_something with QPushButton> return; }}
bool QObject::inherits ( const char * className ) constconst char * QMetaObject::className () const