KeyPressEvent()-Function: I want to use Capital-Letters
-
Hello everybody,
i want to use the keyPressEvent-Function:I want to use small and capital letters, but its not working.
@
case Qt::Key_V:
...
break;
case Qt::Key_Shift && Qt::Key_V:
.....
updateGL();
break;
@Is there other code for Capital letters? Thanks in advance
-
QKeyEvent::key():
bq. See Qt::Key for the list of keyboard codes. These codes are independent of the underlying window system. Note that this function does not distinguish between capital and non-capital letters, use the text() function (returning the Unicode text the key generated) for this purpose.
-
For the rest you have "QKeyEvent::modifiers() ":http://doc.qt.nokia.com/4.7/qkeyevent.html#modifiers. But the API docs state that these are not reliable.