Qt
6.x
The Qt SDK
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 <QtGui>
5
6
class
MainWindow
:
public
QMainWindow
7
{
8
public
:
9
MainWindow
();
10
11
QAction
*
newAct
;
12
};
13
14
MainWindow
()
15
{
17
newAct =
new
QAction
(
tr
(
"&New"
),
this
);
18
newAct->setShortcut(
tr
(
"Ctrl+N"
));
19
newAct->setStatusTip(
tr
(
"Create a new file"
));
20
newAct->setWhatsThis(
tr
(
"Click this option to create a new file."
));
22
}
23
24
int
main
()
25
{
26
return
0;
27
}
MainWindow
[5]
Definition
src_corelib_kernel_qobject.cpp:52
MainWindow::MainWindow
MainWindow()
MainWindow::newAct
QAction * newAct
Definition
whatsthis.cpp:11
QAction
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition
qaction.h:30
QMainWindow
The QMainWindow class provides a main application window.
Definition
qmainwindow.h:25
tr
#define tr(X)
Definition
qtemporaryfile.cpp:21
main
int main()
Definition
whatsthis.cpp:24
qtbase
src
widgets
doc
snippets
whatsthis
whatsthis.cpp
Generated by
1.9.7