Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
4.7.0
-
None
Description
The following program does not produce key events when Shift, Ctrl, Alt or Fn are pressed. However, they are produced on Linux.
class MyLineEdit : public QLineEdit { public: MyLineEdit() :QLineEdit("LineEdit") {} ~MyLineEdit() {} void keyPressEvent(QKeyEvent *e) { qDebug() << e; QLineEdit::keyPressEvent(e); } void keyReleaseEvent(QKeyEvent *e) { qDebug() << e; QLineEdit::keyReleaseEvent(e); } }; int main(int argc, char **argv) { QApplication app(argc, argv); QWidget w; QLayout *layout = new QVBoxLayout; w.setLayout(layout); MyLineEdit *le = new MyLineEdit; layout->addWidget(le); w.show(); return app.exec(); }