i can't find way build-in way someobject->signalpresent(somesignal). maybe missed something. know can in c++ using sfinae, there should same ability in qt.
there's qmetaobject::indexofsignal(). code using like:
if (someqobject->metaobject()->indexofsignal("somesignal(qstring)") != -1) { // has signal ... } else { // doesn't have signal ... } note requirements regarding signature normalization described in documentation, e.g. "somesignal(const qstring&)" won't work.
Comments
Post a Comment