[Qt-interest] QKeyEvent::ascii() alternative in Qt4

Prasanta Sadhukhan Prasanta.Sadhukhan at Sun.COM
Wed Dec 3 10:16:32 CET 2008


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




More information about the Qt-interest-old mailing list