Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.6.3, 5.15.1, 5.15.2
-
None
Description
I inherited QPlainTextEdit and reimplement KeyPressEvent(QKeyEvent) to print info.
void PlainTextEdit::keyPressEvent(QKeyEvent *e) { qDebug()<< "-------------PlainTextEdit--------------"; qDebug()<< "QKeyEvent Text:"<<e->text(); qDebug()<< "QKeyEvent Count:"<<e->count(); qDebug()<< "QKeyEvent isAutoRepeat:"<<e->isAutoRepeat(); if(e->modifiers().testFlag(Qt::ShiftModifier)){qDebug()<<"QKeyEvent modifier:"<<"ShiftModifier";} qDebug()<< "QKeyEvent key:"<<e->key(); return QPlainTextEdit::keyPressEvent(e); }
bug trigger step:
1.press shift and don't release,the key keyPressEvent will be called.
2.press $ (which is 4 without shift, same as other numbers key) ,then haven't call keyPressEvent ,the PlainTextEdit shows a $.
Press shift twice in a row ,then press shift and number key (not at the Numeric keypad), the key keyPressEvent will be called normally.Then press shift twice in a row,it will back to the wrong status.