diff options
author | Niels Weber <niels.weber@digia.com> | 2014-05-12 13:27:24 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-21 11:57:21 +0200 |
commit | 7ccdf8d11675e963b70b565e421309e09c019343 (patch) | |
tree | 8eb30ea495f148b7047f0f4bca94d73905719be4 /examples/quick/demos/photoviewer/main.cpp | |
parent | 3ed6361bbaa711c9f3441704659ccb971751b44e (diff) |
Make a pro file based project out of the photoviewer example
Having a .pro file project is necessary to be able to deploy to
Android. Further patches for Android support will be needed, but
this is the base.
Task-number: QTBUG-38122
Change-Id: I878ec1df50d7375ae9153f8a34f763b5678d7774
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'examples/quick/demos/photoviewer/main.cpp')
-rw-r--r-- | examples/quick/demos/photoviewer/main.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/examples/quick/demos/photoviewer/main.cpp b/examples/quick/demos/photoviewer/main.cpp new file mode 100644 index 0000000000..6ce7c1c1e9 --- /dev/null +++ b/examples/quick/demos/photoviewer/main.cpp @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QApplication> +#include <QQmlApplicationEngine> +#include <QTranslator> +#include <QDebug> + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QTranslator qtTranslator; + qtTranslator.load("qml_" + QLocale::system().name(), ":/i18n/"); + app.installTranslator(&qtTranslator); + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); + + return app.exec(); +} |