内容表

上一话题

QSessionManager

下一话题

QShowEvent

QShortcutEvent

QShortcutEvent class provides an event which is generated when the user presses a key combination. 更多

Inheritance diagram of PySide2.QtGui.QShortcutEvent

概要

函数

详细描述

通常,不需要直接使用此类; QShortcut 提供处理快捷键的更高级别接口。

另请参阅

QShortcut

class QShortcutEvent ( key , id [ , ambiguous=false ] )
param id

int

param ambiguous

bool

param key

QKeySequence

构造快捷键事件为给定 key 按下,关联 QShortcut ID id .

ambiguous specifies whether there is more than one QShortcut for the same key sequence.

PySide2.QtGui.QShortcutEvent. isAmbiguous ( )
返回类型

bool

返回 true if the key sequence that triggered the event is ambiguous.

另请参阅

activatedAmbiguously()

PySide2.QtGui.QShortcutEvent. key ( )
返回类型

QKeySequence

Returns the key sequence that triggered the event.

PySide2.QtGui.QShortcutEvent. shortcutId ( )
返回类型

int

Returns the ID of the QShortcut object for which this event was generated.

另请参阅

id()