QShortcutEvent 類

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

頭: #include <QShortcutEvent>
qmake: QT += gui
繼承: QEvent

公共函數

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

額外繼承成員

詳細描述

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

通常,不需要直接使用此類; 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 ().