summaryrefslogtreecommitdiffstats
path: root/examples/declarative/ui-components/spinner/main.cpp
diff options
context:
space:
mode:
authorartoka <arto.katajasalo@digia.com>2011-11-17 14:50:09 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-11-17 14:59:58 (GMT)
commiteb5b52e9e48d7c5b25302d0c6fbff1b82e4a0464 (patch)
treeec425bef7817857b55a8fe9fb39fb092d9a232d5 /examples/declarative/ui-components/spinner/main.cpp
parentd405e49af2266debf618f0b6aaacf9dce103026f (diff)
downloadQt-eb5b52e9e48d7c5b25302d0c6fbff1b82e4a0464.zip
Qt-eb5b52e9e48d7c5b25302d0c6fbff1b82e4a0464.tar.gz
Qt-eb5b52e9e48d7c5b25302d0c6fbff1b82e4a0464.tar.bz2
ui-components/spinner example modifications
Modified the example to use centralized qmlapplicationviewer, removed duplicate files and modified project files according to the changes. Merge-request: 2719 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'examples/declarative/ui-components/spinner/main.cpp')
-rw-r--r--examples/declarative/ui-components/spinner/main.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/examples/declarative/ui-components/spinner/main.cpp b/examples/declarative/ui-components/spinner/main.cpp
new file mode 100644
index 0000000..969d963
--- /dev/null
+++ b/examples/declarative/ui-components/spinner/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmlapplicationviewer.h"
+#include <QtGui/QApplication>
+
+Q_DECL_EXPORT int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QmlApplicationViewer viewer;
+ viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
+ viewer.setMainQmlFile(QLatin1String("qml/spinner/main.qml"));
+ viewer.showExpanded();
+
+ return app.exec();
+}