I'm trying to manually disconnect a slot from all signals (though there usually is only one).
This seemed like a good bet:
bool QObject::disconnect ( const QObject * receiver,
const char * method
= 0 )
bool QObject::disconnect ( const QObject * receiver, const char * method = 0 )
To copy to clipboard, switch view to plain text mode
I am assuming "method" == SLOT. So i passed the slots class instance as receiver and SLOT(myslot()) as method, but it didnt work.
Tried this, too:
bool QObject::disconnect ( const char * signal = 0,
const QObject * receiver
= 0,
const char * method
= 0 )
bool QObject::disconnect ( const char * signal = 0, const QObject * receiver = 0, const char * method = 0 )
To copy to clipboard, switch view to plain text mode
But no luck either, the slot just stays connected. Destroying and recreating the object is not a solution in this case.
Bookmarks