- class QKeyCombination#
QKeyCombination
类存储了一个带有可选修饰符的按键组合。更多…概述#
方法#
def
__init__()
def
key()
def
__ne__()
def
__eq__()
def
toCombined()
静态函数#
def
fromCombined()
注意
本文档可能包含从C++自动转换为Python的代码片段。我们始终欢迎对代码片段的贡献。如果您发现翻译问题,也可以通过在https:/bugreports.qt.io/projects/PYSIDE创建工单的方式告诉我们。
详细描述#
可以使用
QKeyCombination
类来表示一个键与零个或多个键盘修饰符的组合。另请参阅
- __init__(modifiers[, key=Qt.Key_unknown])#
- 参数:
modifiers –
KeyboardModifier
的组合key –
Key
构建一个表示
key
与修饰符modifiers
的组合的QKeyCombination
对象。另请参阅
- __init__(arg__1)
- 参数:
arg__1 –
QKeyCombination
- __init__([key=Qt.Key_unknown])
- 参数:
key –
Key
构建一个表示按键
key
而没有修饰符的QKeyCombination
对象。另请参阅
- 静态 fromCombined(combined)#
- 参数:
combined – int
- 返回类型::
通过从<code class="docutils literal notranslate">combined中提取键和修饰符来构造<a class="reference internal" href="#PySide6.QtCore.QKeyCombination" title="PySide6.QtCore.QKeyCombination"><code class="xref py py-class docutils literal notranslate"><span class="pre">QKeyCombinationcombined必须是<a class="reference internal" href="Qt.html#PySide6.QtCore.Qt.Key" title="PySide6.QtCore.Qt.Key"><code class="xref py py-attr docutils literal notranslate"><span class="pre">KeyKeyboardModifiers类型值进行位或操作的结果.<a class="reference internal" href="#PySide6.QtCore.QKeyCombination.toCombined" title="PySide6.QtCore.QKeyCombination.toCombined"><code class="xref py py-meth docutils literal notranslate"><span class="pre">toCombined()combined的有效值.
另请参阅
返回此<a class="reference internal" href="#PySide6.QtCore.QKeyCombination" title="PySide6.QtCore.QKeyCombination"><code class="xref py py-class docutils literal notranslate"><span class="pre">QKeyCombination
另请参阅
- <span class="sig-name descname"><span class="pre">keyboardModifiers
- 返回类型::
<a class="reference internal" href="Qt.html#PySide6.QtCore.Qt.KeyboardModifier" title="PySide6.QtCore.Qt.KeyboardModifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">KeyboardModifier
返回此<a class="reference internal" href="#PySide6.QtCore.QKeyCombination" title="PySide6.QtCore.QKeyCombination"><code class="xref py py-class docutils literal notranslate"><span class="pre">QKeyCombination
另请参阅
- <span class="sig-name descname"><span class="pre">__ne__rhs
- 参数:
<strong>rhsQKeyCombination
- 返回类型::
布尔值
如果<code class="docutils literal notranslate"><span class="pre">lhs和<code class="docutils literal notranslate"><span class="pre">rhs具有不同的键和修饰符组合,则返回<code class="docutils literal notranslate"><span class="pre">truefalse
- <span class="sig-name descname"><span class="pre">__eq__rhs
- 参数:
<strong>rhsQKeyCombination
- 返回类型::
布尔值
如果<code class="docutils literal notranslate"><span class="pre">lhs和<code class="docutils literal notranslate"><span class="pre">rhs具有相同的键和修饰符组合,则返回<code class="docutils literal notranslate"><span class="pre">truefalse
- <span class="sig-name descname"><span class="pre">toCombined
- 返回类型::
整型
返回一个整数值,通过对此对象的<a class="reference internal" href="#PySide6.QtCore.QKeyCombination.key" title="PySide6.QtCore.QKeyCombination.key"><code class="xref py py-meth docutils literal notranslate"><span class="pre">key()keyboardModifiers()fromCombined()QKeyCombination