开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜