summaryrefslogtreecommitdiffstats
path: root/examples/linguist/trollprint/main.cpp
blob: 6d7b35ba5ba2ebebbb7b2b6e7a680a17eb55b65d (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
// 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;

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    auto locale = QLocale::system();

//! [0]
    QTranslator translator;
    if (translator.load(locale, u"trollprint"_s, u"_"_s))
        app.installTranslator(&translator);
//! [0]

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