PDA

View Full Version : n00b question: Hit Enter and activate a button?



0xl33t
31st July 2009, 20:03
Hi,

im looking for a way to activate a button by hitting enter while i am writing in a QLineEdit.
See the attached picture, it is a password dialog, and i want to activate the validate button when the user hits enter.

I tried setting autodefault and default to the button, but without success!

franz
31st July 2009, 20:09
The QLineEdit has a signal called returnPressed().

0xl33t
31st July 2009, 20:30
The QLineEdit has a signal called returnPressed().

wow, that's cool!

thanks