Solved Blocking one signal from qt
-
I have an object that emits lots of signals. How can I block just one signal of this object?
-
Hi,
The less complex idea that comes to mind is: you can use a Boolean variable as enabler and if false don't emit the signal.
-
@SGaist Thank you. Its a good idea. I will let the topic as unsolved in case someone knows a easier way.
-
@Amanda1102 The options that I am aware of would be the following:
- QSignalBlocker: This approach will block all signals coming from a specific object
- disconnect: You can call "disconnect" on the specific signal you don't want for a short period of time and then call on "connect" again for the signal again.
- The approach mentioned by @SGaist