#[repr(C)]pub struct QKeyEvent { /* private fields */ }
Expand description
The QKeyEvent class describes a key event.
C++ class: QKeyEvent
.
The QKeyEvent class describes a key event.
Key events are sent to the widget with keyboard input focus when keys are pressed or released.
A key event contains a special accept flag that indicates whether the receiver will handle the key event. This flag is set by default for QEvent::KeyPress and QEvent::KeyRelease, so there is no need to call accept() when acting on a key event. For QEvent::ShortcutOverride the receiver needs to explicitly accept the event to trigger the override. Calling ignore() on a key event will propagate it to the parent widget. The event is propagated up the parent widget chain until a widget accepts it or an event filter consumes it.
The QWidget::setEnabled() function can be used to enable or disable mouse and keyboard events for a widget.
The event handlers QWidget::keyPressEvent(), QWidget::keyReleaseEvent(), QGraphicsItem::keyPressEvent() and QGraphicsItem::keyReleaseEvent() receive key events.
Implementations§
source§impl QKeyEvent
impl QKeyEvent
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QKeyEvent>>
) -> Ref<QKeyEvent>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QKeyEvent>> ) -> Ref<QKeyEvent>
The QKeyEvent class describes a key event.
Calls C++ function: QKeyEvent& QKeyEvent::operator=(const QKeyEvent& other)
.
The QKeyEvent class describes a key event.
Key events are sent to the widget with keyboard input focus when keys are pressed or released.
A key event contains a special accept flag that indicates whether the receiver will handle the key event. This flag is set by default for QEvent::KeyPress and QEvent::KeyRelease, so there is no need to call accept() when acting on a key event. For QEvent::ShortcutOverride the receiver needs to explicitly accept the event to trigger the override. Calling ignore() on a key event will propagate it to the parent widget. The event is propagated up the parent widget chain until a widget accepts it or an event filter consumes it.
The QWidget::setEnabled() function can be used to enable or disable mouse and keyboard events for a widget.
The event handlers QWidget::keyPressEvent(), QWidget::keyReleaseEvent(), QGraphicsItem::keyPressEvent() and QGraphicsItem::keyReleaseEvent() receive key events.
sourcepub unsafe fn count(&self) -> c_int
pub unsafe fn count(&self) -> c_int
Returns the number of keys involved in this event. If text() is not empty, this is simply the length of the string.
Calls C++ function: int QKeyEvent::count() const
.
Returns the number of keys involved in this event. If text() is not empty, this is simply the length of the string.
See also Qt::WA_KeyCompression.
sourcepub unsafe fn is_auto_repeat(&self) -> bool
pub unsafe fn is_auto_repeat(&self) -> bool
Returns true
if this event comes from an auto-repeating key; returns false
if it comes from an initial key press.
Calls C++ function: bool QKeyEvent::isAutoRepeat() const
.
Returns true
if this event comes from an auto-repeating key; returns false
if it comes from an initial key press.
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.
sourcepub unsafe fn key(&self) -> c_int
pub unsafe fn key(&self) -> c_int
Returns the code of the key that was pressed or released.
Calls C++ function: int QKeyEvent::key() const
.
Returns the code of the key that was pressed or released.
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.
A value of either 0 or Qt::Key_unknown means that the event is not the result of a known key; for example, it may be the result of a compose sequence, a keyboard macro, or due to key event compression.
See also Qt::WA_KeyCompression.
sourcepub unsafe fn matches(&self, key: StandardKey) -> bool
pub unsafe fn matches(&self, key: StandardKey) -> bool
Returns true
if the key event matches the given standard key; otherwise returns false
.
Calls C++ function: bool QKeyEvent::matches(QKeySequence::StandardKey key) const
.
Returns true
if the key event matches the given standard key; otherwise returns false
.
This function was introduced in Qt 4.2.
sourcepub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
pub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
Returns the keyboard modifier flags that existed immediately after the event occurred.
Calls C++ function: QFlags<Qt::KeyboardModifier> QKeyEvent::modifiers() const
.
Returns the keyboard modifier flags that existed immediately after the event occurred.
Warning: This function cannot always be trusted. The user can confuse it by pressing both Shift keys simultaneously and releasing one of them, for example.
See also QGuiApplication::keyboardModifiers().
sourcepub unsafe fn native_modifiers(&self) -> u32
pub unsafe fn native_modifiers(&self) -> u32
Returns the native modifiers of a key event. If the key event does not contain this data 0 is returned.
Calls C++ function: quint32 QKeyEvent::nativeModifiers() const
.
Returns the native modifiers of a key event. If the key event does not contain this data 0 is returned.
Note: The native modifiers may be 0, even if the key event contains extended information.
This function was introduced in Qt 4.2.
sourcepub unsafe fn native_scan_code(&self) -> u32
pub unsafe fn native_scan_code(&self) -> u32
Returns the native scan code of the key event. If the key event does not contain this data 0 is returned.
Calls C++ function: quint32 QKeyEvent::nativeScanCode() const
.
Returns the native scan code of the key event. If the key event does not contain this data 0 is returned.
Note: The native scan code may be 0, even if the key event contains extended information.
Note: On Mac OS/X, this function is not useful, because there is no way to get the scan code from Carbon or Cocoa. The function always returns 1 (or 0 in the case explained above).
This function was introduced in Qt 4.2.
sourcepub unsafe fn native_virtual_key(&self) -> u32
pub unsafe fn native_virtual_key(&self) -> u32
Returns the native virtual key, or key sym of the key event. If the key event does not contain this data 0 is returned.
Calls C++ function: quint32 QKeyEvent::nativeVirtualKey() const
.
Returns the native virtual key, or key sym of the key event. If the key event does not contain this data 0 is returned.
Note: The native virtual key may be 0, even if the key event contains extended information.
This function was introduced in Qt 4.2.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier_q_string_bool_ushort(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>,
autorep: bool,
count: c_ushort
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier_q_string_bool_ushort( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier>, text: impl CastInto<Ref<QString>>, autorep: bool, count: c_ushort ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString& text = …, bool autorep = …, unsigned short count = …)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32_q_string_bool_ushort(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
native_scan_code: u32,
native_virtual_key: u32,
native_modifiers: u32,
text: impl CastInto<Ref<QString>>,
autorep: bool,
count: c_ushort
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32_q_string_bool_ushort( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier>, native_scan_code: u32, native_virtual_key: u32, native_modifiers: u32, text: impl CastInto<Ref<QString>>, autorep: bool, count: c_ushort ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString& text = …, bool autorep = …, unsigned short count = …)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
In addition to the normal key event data, also contains nativeScanCode, nativeVirtualKey and nativeModifiers. This extra data is used by the shortcut system, to determine which shortcuts to trigger.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier_q_string_bool(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>,
autorep: bool
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier_q_string_bool( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier>, text: impl CastInto<Ref<QString>>, autorep: bool ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString& text = …, bool autorep = …)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier_q_string(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier_q_string( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier>, text: impl CastInto<Ref<QString>> ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString& text = …)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier> ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32_q_string_bool(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
native_scan_code: u32,
native_virtual_key: u32,
native_modifiers: u32,
text: impl CastInto<Ref<QString>>,
autorep: bool
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32_q_string_bool( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier>, native_scan_code: u32, native_virtual_key: u32, native_modifiers: u32, text: impl CastInto<Ref<QString>>, autorep: bool ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString& text = …, bool autorep = …)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
In addition to the normal key event data, also contains nativeScanCode, nativeVirtualKey and nativeModifiers. This extra data is used by the shortcut system, to determine which shortcuts to trigger.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32_q_string(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
native_scan_code: u32,
native_virtual_key: u32,
native_modifiers: u32,
text: impl CastInto<Ref<QString>>
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32_q_string( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier>, native_scan_code: u32, native_virtual_key: u32, native_modifiers: u32, text: impl CastInto<Ref<QString>> ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString& text = …)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
In addition to the normal key event data, also contains nativeScanCode, nativeVirtualKey and nativeModifiers. This extra data is used by the shortcut system, to determine which shortcuts to trigger.
sourcepub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
native_scan_code: u32,
native_virtual_key: u32,
native_modifiers: u32
) -> CppBox<QKeyEvent>
pub unsafe fn from_type_int_q_flags_keyboard_modifier3_u32( type_: Type, key: c_int, modifiers: QFlags<KeyboardModifier>, native_scan_code: u32, native_virtual_key: u32, native_modifiers: u32 ) -> CppBox<QKeyEvent>
Constructs a key event object.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers)
.
Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
Int key is the code for the Qt::Key that the event loop should listen for. 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. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.
In addition to the normal key event data, also contains nativeScanCode, nativeVirtualKey and nativeModifiers. This extra data is used by the shortcut system, to determine which shortcuts to trigger.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QKeyEvent>>
) -> CppBox<QKeyEvent>
pub unsafe fn new_copy( other: impl CastInto<Ref<QKeyEvent>> ) -> CppBox<QKeyEvent>
The QKeyEvent class describes a key event.
Calls C++ function: [constructor] void QKeyEvent::QKeyEvent(const QKeyEvent& other)
.
The QKeyEvent class describes a key event.
Key events are sent to the widget with keyboard input focus when keys are pressed or released.
A key event contains a special accept flag that indicates whether the receiver will handle the key event. This flag is set by default for QEvent::KeyPress and QEvent::KeyRelease, so there is no need to call accept() when acting on a key event. For QEvent::ShortcutOverride the receiver needs to explicitly accept the event to trigger the override. Calling ignore() on a key event will propagate it to the parent widget. The event is propagated up the parent widget chain until a widget accepts it or an event filter consumes it.
The QWidget::setEnabled() function can be used to enable or disable mouse and keyboard events for a widget.
The event handlers QWidget::keyPressEvent(), QWidget::keyReleaseEvent(), QGraphicsItem::keyPressEvent() and QGraphicsItem::keyReleaseEvent() receive key events.
sourcepub unsafe fn text(&self) -> CppBox<QString>
pub unsafe fn text(&self) -> CppBox<QString>
Returns the Unicode text that this key generated.
Calls C++ function: QString QKeyEvent::text() const
.
Returns the Unicode text that this key generated.
Return values when modifier keys such as Shift, Control, Alt, and Meta are pressed differ among platforms and could return an empty string.
Note: key() will always return a valid value, independent of modifier keys.
See also Qt::WA_KeyCompression.
Methods from Deref<Target = QInputEvent>§
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QInputEvent>>
) -> Ref<QInputEvent>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QInputEvent>> ) -> Ref<QInputEvent>
The QInputEvent class is the base class for events that describe user input.
Calls C++ function: QInputEvent& QInputEvent::operator=(const QInputEvent& other)
.
The QInputEvent class is the base class for events that describe user input.
sourcepub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
pub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
Returns the keyboard modifier flags that existed immediately before the event occurred.
Calls C++ function: QFlags<Qt::KeyboardModifier> QInputEvent::modifiers() const
.
Returns the keyboard modifier flags that existed immediately before the event occurred.
See also QGuiApplication::keyboardModifiers().
sourcepub unsafe fn set_modifiers(&self, amodifiers: QFlags<KeyboardModifier>)
pub unsafe fn set_modifiers(&self, amodifiers: QFlags<KeyboardModifier>)
Calls C++ function: void QInputEvent::setModifiers(QFlags<Qt::KeyboardModifier> amodifiers)
.
sourcepub unsafe fn set_timestamp(&self, atimestamp: c_ulong)
pub unsafe fn set_timestamp(&self, atimestamp: c_ulong)
Calls C++ function: void QInputEvent::setTimestamp(unsigned long atimestamp)
.
sourcepub unsafe fn timestamp(&self) -> c_ulong
pub unsafe fn timestamp(&self) -> c_ulong
Returns the window system's timestamp for this event. It will normally be in milliseconds since some arbitrary point in time, such as the time when the system was started.
Calls C++ function: unsigned long QInputEvent::timestamp() const
.
Returns the window system’s timestamp for this event. It will normally be in milliseconds since some arbitrary point in time, such as the time when the system was started.
Methods from Deref<Target = QEvent>§
sourcepub unsafe fn accept(&self)
pub unsafe fn accept(&self)
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Calls C++ function: void QEvent::accept()
.
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget.
See also ignore().
sourcepub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
pub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
Calls C++ function: QEvent& QEvent::operator=(const QEvent& other)
.
sourcepub unsafe fn ignore(&self)
pub unsafe fn ignore(&self)
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Calls C++ function: void QEvent::ignore()
.
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Clearing the accept parameter indicates that the event receiver does not want the event. Unwanted events might be propagated to the parent widget.
See also accept().
sourcepub unsafe fn is_accepted(&self) -> bool
pub unsafe fn is_accepted(&self) -> bool
the accept flag of the event object
Calls C++ function: bool QEvent::isAccepted() const
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
sourcepub unsafe fn set_accepted(&self, accepted: bool)
pub unsafe fn set_accepted(&self, accepted: bool)
the accept flag of the event object
Calls C++ function: void QEvent::setAccepted(bool accepted)
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
sourcepub unsafe fn spontaneous(&self) -> bool
pub unsafe fn spontaneous(&self) -> bool
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
Calls C++ function: bool QEvent::spontaneous() const
.
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
The return value of this function is not defined for paint events.
Trait Implementations§
source§impl CppDeletable for QKeyEvent
impl CppDeletable for QKeyEvent
source§impl Deref for QKeyEvent
impl Deref for QKeyEvent
source§fn deref(&self) -> &QInputEvent
fn deref(&self) -> &QInputEvent
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QKeyEvent* ptr)
.
§type Target = QInputEvent
type Target = QInputEvent
source§impl DynamicCast<QKeyEvent> for QEvent
impl DynamicCast<QKeyEvent> for QEvent
source§impl DynamicCast<QKeyEvent> for QInputEvent
impl DynamicCast<QKeyEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
Calls C++ function: QKeyEvent* dynamic_cast<QKeyEvent*>(QInputEvent* ptr)
.
source§impl PartialEq<StandardKey> for QKeyEvent
impl PartialEq<StandardKey> for QKeyEvent
source§fn eq(&self, key: &StandardKey) -> bool
fn eq(&self, key: &StandardKey) -> bool
Returns true
if page layout lhs is equal to page layout rhs, i.e. if all the attributes are exactly equal.
Calls C++ function: bool operator==(QKeyEvent* e, QKeySequence::StandardKey key)
.
Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(const QPageLayout &lhs, const QPageLayout &rhs)
:
Returns true
if page layout lhs is equal to page layout rhs, i.e. if all the attributes are exactly equal.
Note that this is a strict equality, especially for page size where the QPageSize ID, name and size must exactly match, and the margins where the units must match.
See also QPageLayout::isEquivalentTo().
source§impl StaticDowncast<QKeyEvent> for QEvent
impl StaticDowncast<QKeyEvent> for QEvent
source§impl StaticDowncast<QKeyEvent> for QInputEvent
impl StaticDowncast<QKeyEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
Calls C++ function: QKeyEvent* static_cast<QKeyEvent*>(QInputEvent* ptr)
.
source§impl StaticUpcast<QEvent> for QKeyEvent
impl StaticUpcast<QEvent> for QKeyEvent
source§impl StaticUpcast<QInputEvent> for QKeyEvent
impl StaticUpcast<QInputEvent> for QKeyEvent
source§unsafe fn static_upcast(ptr: Ptr<QKeyEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QKeyEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QKeyEvent* ptr)
.