Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QObject::disconnect() on a queued connection
Uwe Kindler last edited by
If I call disconnect() on a queued SIGNAL/SLOT connection then it may happen, that the target slot of this connection gets called after the disconnect call. This is not explicitely documented in the SIGNAL/SLOT documentation but I think that all SIGNALs that are already in the queue of the queued connection get executed even if the connection is already disconnected.
Is this right or am I wrong here?
If it is right, then it should be documented in the SIGNAL/SLOT documentation or disconnect() documentation because it may cause strange effects if somone expects that calling disconnect() means "my slot function will never get called from now on" (like me :O)
andre last edited by
Interesting suggestion. I think you are right, but I am not sure either.
silicomancer last edited by
Pretty old posting. But I have the same question. Is he right? Doesn't a disconnect() prevent queued calls from being executed? Does the documentation describe this behaviour somewhere?