Luke Lee

Software Engineer

Web + Desktop + Science

Fork me on Github

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:

https://gist.github.com/durden/5060373

Published: 02-28-2013 21:51:00

lukelee.net