Useful context manager for PyQt slot disconnection¶
Every now and then you might want to temporarily disconnect a PyQt slot, run some arbitrary amount of code, and ensure the slot is connected again. Unfortunately, it's too easy to forget to reconnect that slot, which can lead to some lost time debugging a 'trivial' issue. So, I created a very simple little context manager to do this: