diff options
Diffstat (limited to 'examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp')
-rw-r--r-- | examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp index ea6c7f2f9a..524af1e915 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 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 @@ -40,7 +50,6 @@ #include "mainwindow.h" #include "fbitem.h" -#include <QCoreApplication> #include <QVBoxLayout> #include <QGroupBox> #include <QRadioButton> @@ -48,10 +57,11 @@ #include <QLabel> #include <QQuickItem> -MainWindow::MainWindow(bool transparency) +MainWindow::MainWindow(bool transparency, bool noRenderAlpha) : m_currentView(0), m_currentRootObject(0), - m_transparent(transparency) + m_transparent(transparency), + m_noRenderAlpha(noRenderAlpha) { QVBoxLayout *layout = new QVBoxLayout; @@ -178,7 +188,7 @@ void MainWindow::updateView() if (m_currentRootObject) { m_currentRootObject->setProperty("currentText", text); m_currentRootObject->setProperty("multisample", m_checkboxMultiSample->isChecked()); - if (!QCoreApplication::arguments().contains(QStringLiteral("--no_render_alpha"))) + if (!m_noRenderAlpha) m_currentRootObject->setProperty("translucency", m_transparent); } |