Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.6.0
-
None
-
Arch Linux + KDE with Swedish keyboard layout
Description
Not sure if this is related to some recent fixes regarding shortcut handling, but on 4.8.7, 5.2.1 and 5.5.1, the attached test case prints "clicked" when Ctrl+O is pressed, as expected. On 5.6.0 it prints nothing.
Showing the code inline here as well:
#include <QApplication> #include <QMainWindow> #include <QPushButton> #include <QKeySequence> #include <QWidget> #include <QDebug> class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = 0) : QMainWindow(parent) { QPushButton *button = new QPushButton("Click Me (Ctrl+O)"); button->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_O)); connect(button, SIGNAL(clicked()), this, SLOT(onClicked())); setCentralWidget(button); } public slots: void onClicked() { qDebug() << "clicked"; } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; window.show(); return app.exec(); } #include "moc_test.cpp"