How to convert ASCII(Unicode) code to Qt::Key_ code?
For example: '>' -> 0x3e (Qt:开发者_StackOverflow:Key_Greater)
If I understood the values of the Qt::Key
enum correctly you do not need any conversion since the Qt::Key values are the same as the unicode values i.e. a cast would suffice:
Qt::Key_Greater == (Qt::Key) '>'
should be true for this particular key. There are of course other special keys where this does not make sense ...
精彩评论