Skip to content

Instantly share code, notes, and snippets.

@florentsorel
Forked from weijia/clipboard_notification.py
Last active August 29, 2015 14:13
Show Gist options
  • Save florentsorel/5071671296a4b9175387 to your computer and use it in GitHub Desktop.
Save florentsorel/5071671296a4b9175387 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
#coding=utf-8
import sys
from PyQt4 import QtGui, QtCore
import os
def notification():
print "good"
if __name__ == '__main__':
print "OS Name:"+os.name
app = QtGui.QApplication(sys.argv)
edit = QtGui.QLineEdit()
edit.setText('foo bar')
edit.show()
app.clipboard().dataChanged.connect(notification)
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment