QShortcutEvent 类

QShortcutEvent 类提供当用户按下组合键时生成的事件。 更多...

头: #include <QShortcutEvent>
qmake: QT += gui
继承: QEvent

公共函数

QShortcutEvent (const QKeySequence & key , int id , bool ambiguous = false)
virtual ~QShortcutEvent ()
bool isAmbiguous () const
const QKeySequence & key () const
int shortcutId () const

详细描述

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

另请参阅 QShortcut .

成员函数文档编制

QShortcutEvent:: QShortcutEvent (const QKeySequence & key , int id , bool ambiguous = false)

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

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

[虚拟] QShortcutEvent:: ~QShortcutEvent ()

销毁事件对象。

bool QShortcutEvent:: isAmbiguous () const

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

另请参阅 QShortcut::activatedAmbiguously ().

const QKeySequence &QShortcutEvent:: key () const

Returns the key sequence that triggered the event.

int QShortcutEvent:: shortcutId () const

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

另请参阅 QShortcut::id ().