QKeyCombination 类存储键和可选修饰符的组合。 更多...
头: | #include <QKeyCombination> |
CMake: |
find_package(Qt6 COMPONENTS Core REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Since: | Qt 6.0 |
QKeyCombination (Qt::KeyboardModifiers modifiers , Qt::Key key = Qt::Key_unknown) | |
QKeyCombination (Qt::Modifiers modifiers , Qt::Key key = Qt::Key_unknown) | |
QKeyCombination (Qt::Key key = Qt::Key_unknown) | |
Qt::Key | key () const |
Qt::KeyboardModifiers | keyboardModifiers () const |
int | toCombined () const |
QKeyCombination | fromCombined (int combined ) |
size_t | qHash (QKeyCombination key , size_t seed = 0) |
bool | operator!= (QKeyCombination lhs , QKeyCombination rhs ) |
QDebug | operator<< (QDebug debug , QKeyCombination combination ) |
QDataStream & | operator<< (QDataStream & out , QKeyCombination combination ) |
bool | operator== (QKeyCombination lhs , QKeyCombination rhs ) |
QDataStream & | operator>> (QDataStream & in , QKeyCombination & combination ) |
QKeyCombination | operator| (Qt::Modifier modifier , Qt::Key key ) |
QKeyCombination | operator| (Qt::KeyboardModifier modifier , Qt::Key key ) |
QKeyCombination | operator| (Qt::Key key , Qt::Modifier modifier ) |
QKeyCombination | operator| (Qt::Key key , Qt::KeyboardModifier modifier ) |
QKeyCombination | operator| (Qt::Modifiers modifiers , Qt::Key key ) |
QKeyCombination | operator| (Qt::KeyboardModifiers modifiers , Qt::Key key ) |
QKeyCombination | operator| (Qt::Key key , Qt::Modifiers modifiers ) |
QKeyCombination | operator| (Qt::Key key , Qt::KeyboardModifiers modifiers ) |
QKeyCombination 类可用于表示具有零个或多个键盘修饰符的键组合。
另请参阅 QKeySequence .
Constructs a QKeyCombination object that represents the combination of key 采用修饰符 modifiers .
另请参阅 key () 和 keyboardModifiers ().
Constructs a QKeyCombination object that represents the combination of key 采用修饰符 modifiers .
另请参阅 key () 和 keyboardModifiers ().
Constructs a QKeyCombination object that represents the key key and no modifiers.
另请参阅 key ().
[static]
QKeyCombination
QKeyCombination::
fromCombined
(
int
combined
)
构造 QKeyCombination object by extracting the key and the modifiers out of combined , which must be the result of a bitwise OR between a value of type Qt::Key and value of type Qt::KeyboardModifiers . toCombined () can be used in order to produce valid values for combined .
另请参阅 toCombined ().
返回表示的键通过此 QKeyCombination 对象。
另请参阅 keyboardModifiers ().
返回表示的键盘修饰符通过此 QKeyCombination 对象。
另请参阅 key ().
Returns an integer value obtained by applying a bitwise OR between the values of key () 和 keyboardModifiers () represented by this object. A QKeyCombination object can be created from the returned integer value by using fromCombined ().
另请参阅 fromCombined (), key (),和 keyboardModifiers ().
返回 QKeyCombination 对象以表示组合的 key 采用修饰符 modifiers .
返回 QKeyCombination 对象以表示组合的 key with the modifier modifier .
返回哈希值为 key ,使用 seed 做计算种子。
返回
true
if
lhs
and
rhs
have different combinations of key and modifiers, otherwise
false
.
写入组合 combination 到 debug 对象 debug 为调试目的。
另请参阅 调试技术 .
写入组合 combination 进流 out 。返回 out .
另请参阅 序列化 Qt 数据类型 .
返回
true
if
lhs
and
rhs
have the same combination of key and modifiers, and
false
否则。
读取组合 combination 从流 in 。返回 in .
另请参阅 序列化 Qt 数据类型 .