PySide6.QtCore.QKeyCombination¶
- class QKeyCombination¶
The
QKeyCombinationclass stores a combination of a key with optional modifiers.Details
The
QKeyCombinationclass can be used to represent a combination of a key with zero or more keyboard modifiers.See also
Synopsis¶
Methods¶
def
__init__()def
key()def
__ne__()def
__eq__()def
toCombined()
Static functions¶
def
fromCombined()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__(arg__1)¶
- Parameters:
arg__1 –
QKeyCombination
- __init__([key=Qt.Key_unknown])
- Parameters:
key –
Key
Constructs a
QKeyCombinationobject that represents the keykeyand no modifiers.See also
- __init__(modifiers[, key=Qt.Key_unknown])
- Parameters:
modifiers – Combination of
KeyboardModifierkey –
Key
Constructs a
QKeyCombinationobject that represents the combination ofkeywith the modifiersmodifiers.See also
- static fromCombined(combined)¶
- Parameters:
combined – int
- Return type:
Constructs a
QKeyCombinationobject by extracting the key and the modifiers out ofcombined, which must be the result of a bitwise OR between a value of typeKeyand value of typeKeyboardModifiers.toCombined()can be used in order to produce valid values forcombined.See also
Returns the key represented by this
QKeyCombinationobject.See also
- keyboardModifiers()¶
- Return type:
Combination of
KeyboardModifier
Returns the keyboard modifiers represented by this
QKeyCombinationobject.See also
- __ne__(rhs)¶
- Parameters:
rhs –
QKeyCombination- Return type:
bool
Returns
trueiflhsandrhshave different combinations of key and modifiers, otherwisefalse.- __eq__(rhs)¶
- Parameters:
rhs –
QKeyCombination- Return type:
bool
Returns
trueiflhsandrhshave the same combination of key and modifiers, andfalseotherwise.- toCombined()¶
- Return type:
int
Returns an integer value obtained by applying a bitwise OR between the values of
key()andkeyboardModifiers()represented by this object. AQKeyCombinationobject can be created from the returned integer value by usingfromCombined().See also