summaryrefslogtreecommitdiff
path: root/examples/linguist/arrowpad/mainwindow.cpp
blob: 6b8b7816c0a7468b9d50a0a533baf5c2344cecf6 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#include <QtWidgets>

#include "arrowpad.h"
#include "mainwindow.h"

MainWindow::MainWindow()
{
//! [0]
    arrowPad = new ArrowPad;
//! [0]
    setCentralWidget(arrowPad);

//! [1]
    exitAct = new QAction(tr("E&xit"), this);
    exitAct->setShortcuts(QKeySequence::Quit);
    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
//! [1]

    fileMenu = menuBar()->addMenu(tr("&File"));
    fileMenu->addAction(exitAct);
}