Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
whatsthis.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
4
#
include
<
QMainWindow
>
5
#
include
<
QAction
>
6
7
class
MainWindow
:
public
QMainWindow
8
{
9
public
:
10
QAction
*
newAct
;
11
MainWindow
()
12
{
13
//! [0]
14
newAct =
new
QAction(tr(
"&New"
),
this
);
15
newAct->setShortcut(tr(
"Ctrl+N"
));
16
newAct->setStatusTip(tr(
"Create a new file"
));
17
newAct->setWhatsThis(tr(
"Click this option to create a new file."
));
18
//! [0]
19
}
20
};
21
22
int
main
()
23
{
24
return
0;
25
}
MainWindow
[6]
Definition
src_corelib_kernel_qmetaobject.cpp:74
MainWindow::MainWindow
MainWindow()
Definition
src_corelib_kernel_qobject.cpp:79
MainWindow::newAct
QAction * newAct
Definition
whatsthis.cpp:10
main
int main()
[open]
Definition
doc_src_objecttrees.cpp:7
qtbase
src
widgets
doc
snippets
whatsthis
whatsthis.cpp
Generated on
for Qt by
1.14.0