[Qt-interest] Has QKeyEvent::matches() gone buggy in Qt 4.7 for OS X?

Nikos Chantziaras realnc at arcor.de
Fri Jun 4 05:29:46 CEST 2010


On 06/04/2010 06:06 AM, Nikos Chantziaras wrote:
> Rebuilding an application against Qt 4.7 beta1 (32bit Cocoa) on OS X
> resulted in QKeyEvent::matches() not recognizing some of the
> QKeySequence::StandardKey shortcuts.
>
> For example, in my implementation of keyPressEvent(QKeyEvent* e), I have
> this:
>
> if (e->matches(QKeySequence::MoveToStartOfLine)) {
> // Move cursor to start of line.
> }
>
> In Linux, Windows and OS X with Qt 4.6.2, this triggers the code that
> moves the cursor to the start of the line. Qt knows which shortcut does
> that:
>
> Linux and Windows: "Home" key
> OS X: Ctrl+A
>
> On OS X with Qt 4.7 beta1, it does not trigger when pressing Ctrl+A.
> Anyone else noticed something like this? This pretty much totally breaks
> my custom text input class, since many automatic shortcuts stopped working.

Whoops, please ignore.  Ctrl+A is mapped to 
QKeySequence::MoveToStartOfBlock.



More information about the Qt-interest-old mailing list