summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/whatsthis/whatsthis.cpp
blob: c0ec07df7c3a28606c0620b36ce0057f6c7afaa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#include <QtGui>

class MainWindow : public QMainWindow
{
public:
    MainWindow();

    QAction *newAct;
};

MainWindow()
{
//! [0]
    newAct = new QAction(tr("&New"), this);
    newAct->setShortcut(tr("Ctrl+N"));
    newAct->setStatusTip(tr("Create a new file"));
    newAct->setWhatsThis(tr("Click this option to create a new file."));
//! [0]
}

int main()
{
    return 0;
}