QShortcutEvent 類提供當用戶按下組閤鍵時生成的事件。 更多...
| 頭: |
#include <QShortcutEvent>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
|
| qmake: |
QT += gui
|
| 繼承: | QEvent |
(從 6.5 起)
|
QShortcutEvent (const QKeySequence & key , const QShortcut * shortcut = nullptr, bool ambiguous = false) |
| bool | isAmbiguous () const |
| const QKeySequence & | key () const |
通常,不需要直接使用此類; QShortcut 提供處理快捷鍵的更高級彆接口。
另請參閱 QShortcut .
[since 6.5]
QShortcutEvent::
QShortcutEvent
(const
QKeySequence
&
key
, const
QShortcut
*
shortcut
= nullptr,
bool
ambiguous
= false)
構造快捷鍵事件為給定 key 按下,關聯 QShortcut shortcut .
ambiguous specifies whether there is more than one QShortcut for the same key sequence.
該函數在 Qt 6.5 引入。
返迴
true
if the key sequence that triggered the event is ambiguous.
另請參閱 QShortcut::activatedAmbiguously ().
Returns the key sequence that triggered the event.