diff options
Diffstat (limited to 'examples/quick/scenegraph/rendernode/main.cpp')
-rw-r--r-- | examples/quick/scenegraph/rendernode/main.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/examples/quick/scenegraph/rendernode/main.cpp b/examples/quick/scenegraph/rendernode/main.cpp index 3e1714313e..21419abfc9 100644 --- a/examples/quick/scenegraph/rendernode/main.cpp +++ b/examples/quick/scenegraph/rendernode/main.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** 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: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 @@ -38,6 +48,8 @@ ** ****************************************************************************/ +#include <QCommandLineParser> +#include <QCommandLineOption> #include <QGuiApplication> #include <QQuickView> #include "customrenderitem.h" @@ -50,7 +62,19 @@ int main(int argc, char **argv) QQuickView view; - if (QCoreApplication::arguments().contains(QStringLiteral("--multisample"))) { + QCoreApplication::setApplicationName("Qt Scene Graph Render Node Example"); + QCoreApplication::setOrganizationName("QtProject"); + QCoreApplication::setApplicationVersion(QT_VERSION_STR); + QCommandLineParser parser; + parser.setApplicationDescription(QCoreApplication::applicationName()); + parser.addHelpOption(); + parser.addVersionOption(); + QCommandLineOption multipleSampleOption("multisample", "Multisampling"); + parser.addOption(multipleSampleOption); + + parser.process(app); + + if (parser.isSet(multipleSampleOption)) { QSurfaceFormat fmt; fmt.setSamples(4); view.setFormat(fmt); |