myclass* pthis =(myclass*)user_value; // get this address
pthis->emit storescpProgressInfo(filename) ;
}
static void emitMsg( unsigned long user_value,char * filename)
{
myclass* pthis = (myclass*)user_value; // get this address
pthis->emit storescpProgressInfo(filename) ;
}
To copy to clipboard, switch view to plain text mode
No allocation, no setting up connections, no nothing, just emiting a signal.
You set the connection there where the emitting and receiving object are visible, and you only need to do it once.
But then again, I don't really know what it is you are trying to do (appart from emiting a signal in a callback.).
You are right, the slots would only be set up when the decoder si initially created. However, it seems a bit messy. If the way I'm trying to do it now doesn't work I'll give it a shot.
Bookmarks