Hi to all!!
I'm new with python and qt, and i'm trying to make my program,written with pyqt4 in linux, execute some code when I press a keyboard button. I can't understand how to implement the keyPressEvent in my program 
Searching with google i found this:
def keyPressEvent(self, e):
print e.key()
e.ignore()
class Test(QtGui.QTextEdit):
def keyPressEvent(self, e):
print e.key()
e.ignore()
To copy to clipboard, switch view to plain text mode
but this won't work to me, 'cause it declares a QTextEdit class, but i use a QWidget, so the .key() doesn't work 
How can I do?? Thaks to all!!!
P.S. Sorry for the ignorance and the english.
Bookmarks