[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Key return
From:       David Boddie <david () boddie ! org ! uk>
Date:       2008-11-22 19:53:18
Message-ID: 200811222053.19130.david () boddie ! org ! uk
[Download RAW message or body]

On Sat Nov 22 18:39:26 GMT 2008, Milan Hem¸al wrote:

> i mean:
> if press ENTER on the button with focus - call action for this button (
> same like if press key SPACE

You can set a shortcut for the button using its setShortcut() method:

  http://doc.trolltech.com/4.4/qabstractbutton.html#shortcut-prop

So, something like

  button.setShortcut("Enter")

should work for this case.

David

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic