Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
src_gui_kernel_qshortcut.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
5
shortcut
=
new
QShortcut
(
QKeySequence
(
tr
(
"Ctrl+O"
,
"File|Open"
)),
6
parent
);
8
9
11
setKey
(0);
// no signal emitted
12
setKey
(
QKeySequence
());
// no signal emitted
13
setKey
(0x3b1);
// Greek letter alpha
14
setKey
(
Qt::Key_D
);
// 'd', e.g. to delete
15
setKey
(
'q'
);
// 'q', e.g. to quit
16
setKey
(
Qt::CTRL
|
Qt::Key_P
);
// Ctrl+P, e.g. to print document
17
setKey
(
"Ctrl+P"
);
// Ctrl+P, e.g. to print document
QKeySequence
The QKeySequence class encapsulates a key sequence as used by shortcuts.
Definition
qkeysequence.h:35
QShortcut
The QShortcut class is used to create keyboard shortcuts.
Definition
qshortcut.h:19
Qt::CTRL
@ CTRL
Definition
qnamespace.h:1070
Qt::Key_D
@ Key_D
Definition
qnamespace.h:549
Qt::Key_P
@ Key_P
Definition
qnamespace.h:561
tr
#define tr(X)
Definition
qtemporaryfile.cpp:21
setKey
setKey(0)
[0]
shortcut
shortcut
[0]
Definition
src_gui_kernel_qshortcut.cpp:5
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtbase
src
gui
doc
snippets
code
src_gui_kernel_qshortcut.cpp
Generated by
1.9.7