I need to connect a signal retrieved from QMetaMethod::signature(). There doesn't seem to be a Qt function to achieve this, so I had a look at the SIGNAL macro, and so this is what I do (basically stick a "2" in front of the signature):
char holdstr[1000];
sprintf(holdstr,"2%s",mymethod.signature());
connect(obj,holdstr,this,SLOT(myslot()));
QMetaMethod mymethod=...;
char holdstr[1000];
sprintf(holdstr,"2%s",mymethod.signature());
connect(obj,holdstr,this,SLOT(myslot()));
To copy to clipboard, switch view to plain text mode
It's a hack and I don't like it -- not even sure it will work all the time. Is there a better way to achieve this?
Thanks
Bookmarks