Determine whether a slot method registered at some QObject
-
I am wondering whether Qt gives a way to determine that some Object has registered slot method with known name?
-
@kshegunov Many thanks
-
@kshegunov Many thanks
-
@kshegunov Am I correct concluding that using methods like QMetaObject::indexOfSlot is possible only when slot is registered by means of SLOT macro + subsequent MOCing and cannot be used with slot pointers?
-
@kshegunov Am I correct concluding that using methods like QMetaObject::indexOfSlot is possible only when slot is registered by means of SLOT macro + subsequent MOCing and cannot be used with slot pointers?
Yes, because function pointers are function pointers, there's no "slot function pointer" that's different than any other method pointer. In fact you can use the pointer-to-member syntax even with methods that are not declared as slots.