QShortcutEvent 类提供当用户按下组合键时生成的事件。 更多...
头: | #include <QShortcutEvent> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
继承: | QEvent |
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.