It adds nothing new to what the trivial and license wizard examples show, other than a bunch of somewhat messy and outdated code to generate C++ code files based on the input. The example is referenced in a few parts of the documentation, but there are equivalent snippets in the trivial and license wizard examples, so point at those instead, and add some relevant API usage where needed. Pick-to: 6.5 Change-Id: If1ff57e775bad28920d9e019aeccae69d1f4d127 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
29 lines
741 B
C++
29 lines
741 B
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
|
|
|
#include <QApplication>
|
|
#include <QTranslator>
|
|
#include <QLocale>
|
|
#include <QLibraryInfo>
|
|
|
|
#include "classwizard.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
Q_INIT_RESOURCE(classwizard);
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
#ifndef QT_NO_TRANSLATION
|
|
QString translatorFileName = QLatin1String("qtbase_");
|
|
translatorFileName += QLocale::system().name();
|
|
QTranslator *translator = new QTranslator(&app);
|
|
if (translator->load(translatorFileName, QLibraryInfo::path(QLibraryInfo::TranslationsPath)))
|
|
app.installTranslator(translator);
|
|
#endif
|
|
|
|
ClassWizard wizard;
|
|
wizard.show();
|
|
return app.exec();
|
|
}
|