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

#include <QtWidgets>

#include "mainwindow.h"

using namespace Qt::StringLiterals;

//! [0]
int main(int argc, char *argv[])
//! [0] //! [1]
{
    QApplication app(argc, argv);

    auto locale = QLocale::system();

//! [2]
    QTranslator translator;
//! [2] //! [3]
    if (translator.load(locale, u"arrowpad"_s, u"_"_s))
        app.installTranslator(&translator);
//! [1] //! [3]

    MainWindow mainWindow;
    mainWindow.show();
    return app.exec();
}