Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1
-
Os X 10.11, Xcode 7.2.1.
-
-
b4869b8e9324c1614333066a6cc5d0df0d7b6af9
Description
Qt::AA_MacDontSwapCtrlAndMeta doesn't seem to swap the modifiers after all.
The bug can be reproduced e.g with the 'font sampler' example.
if one adds:
app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
app.installEventFilter(new EventFilter());
and:
class EventFilter : public QObject { protected: bool eventFilter(QObject *obj, QEvent *event) { if (event->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); Qt::KeyboardModifiers modifiers = keyEvent->modifiers(); if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) qDebug() << modifiers; return QObject::eventFilter(obj, event); } } };
Run the example and do select with:
- cmd + mouse press (it still shows that the control modifier was pressed)
- ctrl + mouse press (it still shows the the meta modifier was pressed)
So, it still swaps the modifiers even AA_MacDontSwapCtrlAndMeta is set.