These codes are independent of the underlying window system. See Qt::Key for the list of keyboard codes. Returns the code of the key that was pressed or released. Note that if the event is a multiple-key compressed event that is partly due to auto-repeat, this function could return either true or false indeterminately. Returns true if this event comes from an auto-repeating key returns false if it comes from an initial key press. If text() is not empty, this is simply the length of the string. Returns the number of keys involved in this event. count is the number of keys involved in the event. If autorep is true, isAutoRepeat() will be true. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If key is 0, the event is not a result of a known key for example, it may be the result of a compose sequence or keyboard macro. Int key is the code for the Qt::Key that the event loop should listen for. QKeyEvent:: QKeyEvent( QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString & text = QString(), bool autorep = false, ushort count = 1) This extra data is used by the shortcut system, to determine which shortcuts to trigger. In addition to the normal key event data, also contains nativeScanCode, nativeVirtualKey and nativeModifiers. The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride. Member Function Documentation QKeyEvent:: QKeyEvent( QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString & text = QString(), bool autorep = false, ushort count = 1)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |