Skip to content

Instantly share code, notes, and snippets.

@geeksunny
Created August 14, 2012 06:46
Show Gist options
  • Save geeksunny/3346990 to your computer and use it in GitHub Desktop.
Save geeksunny/3346990 to your computer and use it in GitHub Desktop.
Fix for PyQt's _triggered() functions being double called.
# Instead of this...
def on_actionBuild_Zip_triggered(self):
[...]
# ... We do this.
def on_actionBuild_Zip_triggered(self, checked=None):
if checked is None: return # Makes certain the action does not get ran twice.
[...]
# This ensures that when it does get called twice, the second time will be ignored immediately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment