KeyEvent QML Type
QKeyEvent C++ クラスの QML フロントエンドです。詳細...
Import Statement: | import Qt3D.Input 2.8 |
In C++: | QKeyEvent |
Status: | Deprecated |
プロパティ
- accepted : bool
- count : int
- isAutoRepeat : bool
- key : int
- modifiers : int
- nativeScanCode : quint32
- text : string
方法
- bool matches(StandardKey key)
詳細説明
KeyEvent QML型を直接生成することはできません。このタイプのオブジェクトはKeyboardHandler のシグナルパラメータとして使用される。
プロパティの説明
accepted : bool |
acceptedを true
に設定すると、キーイベントがアイテムの親に伝搬されるのを防ぐことができる。
一般的に、アイテムがキーイベントに反応する場合は、祖先のアイテムも同じイベントに反応しないように、acceptedにする必要があります。
isAutoRepeat : bool |
このイベントが自動繰り返しキーに由来するかどうかを保持します。
key : int |
modifiers : int |
このプロパティは、イベントが発生する直前に存在したキーボード修飾フラグを保持します。
KeyEvent.modifiers も参照 。
nativeScanCode : quint32 |
このプロパティは、押されたキーのネイティブスキャンコードを保持する。これはQKeyEvent から変更されずに渡される。
QKeyEvent::nativeScanCode()も参照 。
text : string |
このプロパティは、キーが生成した Unicode テキストを保持します。Shift、Control、Alt、Meta などの修飾キーが押されたり離されたりしている場合、返されるテキストは空文字列になることがあります。そのような場合、key は有効な値を含みます。
メソッドの説明
bool matches(StandardKey key) |
キーイベントが与えられた標準key にマッチする場合はtrue
を返し、そうでない場合はfalse
を返す。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.