-
Bug
-
Resolution: Duplicate
-
P2: Important
-
5.5.1, 5.6.0
-
None
-
Mac OS X (El Capital 10.11.3).
-
-
26961e32f34c06f083fe441c23be6874f03446a3
QShortcuts in Mac OS X works very strange way with no-english keyboard layout (in windows and linux it works fine).
1. After application start, change keyboard layout to russian - shortcuts not work.
2. After application start, check shortcut at english keyboard layout - shortcuts work. Change layout to russian - shortcuts still work. (!!!)
3. After application start, change keyboard layout to russian - shortcuts not work. Change layout to english - shortcuts still not work. (!!!???)
4. If we add QAction with shortcut to application menu - shortcut work with any keyboard layout.
Minimal example:
#include <QApplication>
#include <QLabel>
#include <QShortcut>
#include <QTime>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QLabel* label = new QLabel(QTime::currentTime().toString("hh:mm:ss:zzz"));
QShortcut* shortcut = new QShortcut(QKeySequence("Ctrl+U"), label);
QObject::connect(shortcut, &QShortcut::activated, [=] {
label->setText(QTime::currentTime().toString("hh:mm:ss:zzz"));
});
label->show();
return a.exec();
}
- duplicates
-
QTBUG-50865 [OS X]: Switching the input source from "Russian - PC" to "U.S." may prevent registered accelerators from working
-
- Closed
-