简体   繁体   中英

What is different QKeyEvent modifiers in Qt4 and Qt5

When I enter the number pad side of the keyboard in qt4, I want to receive QEvent::KeyPress and process it. However, if I check the modifiers() of the event, KeypadModifier should come in, but NoModifier is entered in the first time. After that, get a proper KeypadModifier. In qt5, the keypadModifier is obtained from the beginning. Why is it like this?

I found the problem with qt4 itself.

https://bugreports.qt.io/browse/QTBUG-15833?gerritIssueStatus=Open

So, I use KeyRelase event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM