C
KeyEvent QML Type
Provides information about a key event. More...
Import Statement: | import QtQuick . |
Since: | Qt Quick Ultralite 1.3 |
Properties
- key : int
Detailed Description
For example, the following changes the Item's state property when the Enter key is pressed:
Item { Keys.onPressed: { if (event.key == Qt.Key_Enter) state = 'ShowDetails'; } }
Note: This event provides only basic information about the key code, without any key modifiers or other
See also Keys.
Property Documentation
key : int |
This property holds the code of the key that was pressed or released.
See Qt::Key for the list of keyboard codes.
Note: This property does not distinguish between capital and non-capital letters.
Available under certain Qt licenses.
Find out more.