PDA

View Full Version : QKeyEvent::ascii alternative in QT4



psadhukhan
3rd December 2008, 10:53
Hi,

In Qt3, we were using QKeyEvent::ascii() to get the ascii character of
the key pressed, so when we press "a", we get 0x61 and when we press
"A", we get 0x41
IIn Qt4, tried using QKeyEvent::text()->toAscii()->toInt() but all I am
getting is 0
Can anyone point me as to what I should be using to get the ascii value
of the key pressed?

Regards
Prasanta

drhex
3rd December 2008, 13:32
QKeyEvent::text()->toAscii()[0]