[PyQt] QLineEdit vs. menu keyboard shortcuts

Baz Walter bazwal at ftml.net
Tue Jun 28 19:25:54 BST 2011

On 28/06/11 19:17, Hans-Peter Jansen wrote:
> On Tuesday 28 June 2011, 19:56:35 Nathan Weston wrote:
>> In the latter mode, the widget is temporarily set as non-editable, so
>> its built-in Undo behavior doesn't work at all (but it still eats the
>> keyboard event!).
> If you're subclassing QLineEdit anyway, what does stop you from
> overriding keyPressEvent to catch and accept() any unwanted key
> presses?

it sounds like he might want to drag with the mouse and use keyboard 
shortcuts at the same time - otherwise, why worry about keyboard events?

(then again, i might just have completely misunderstood :)

More information about the PyQt mailing list