[Qt] Key problem

Den Jean Den.Jean at telenet.be
Wed Sep 5 22:51:43 CEST 2007


On Wednesday 05 September 2007 04:41:05 Paul Ishenin wrote:
> when I press [Ctrl + Shit + 2]. Debugging show me that in that case Qt
> returns QtKey_At instead of QtKey_2. I am just curious is that bug of qt

Everything as expected no :-; Read The Docs.  
(I admit I was surprised aswell).

QKeyEvent::key returns the Key Name, regardless of the modifiers, such as 
shift. But the problem is that shift changes the the returned keys names :-).
So when shift is pressed, the same key may return KeyAt or "2" or another key 
Exclam and "1". In the same way, the same key return QtKey_P, there is no 
different definition for "p" and "P". 





More information about the Qt mailing list