The UI is as following .
http://img.my.csdn.net/uploads/201211/03/1351957960_1171.jpg

What I want is :
When I press the Enter key ,the label should shows “Enter”
When I press The blank space key ,the label should shows “space”

How to implement this ?

I know I should reimplement the keyPressEvent handler ,but I guss I was got stuck by the focus

What kind of GUI toolkit are you using?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.