开发者

How to convert ASCII(Unicode) code to Qt::Key_ code?

开发者 https://www.devze.com 2023-02-20 00:17 出处:网络
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 unico

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 ...

0

精彩评论

暂无评论...
验证码 换一张
取 消