aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-09-09 14:57:31 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-09-10 20:20:10 +0200
commitd22769c728ff5b705acdc87c8c8ed20602ad48e3 (patch)
treeb2588671007fcafac7ac8abea8a8512f435baf4e /examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
parent36b365040a18653b3c522ea573a506b955b6c4da (diff)
Beautify the qquickviewcomparison example
Remove the red rectangle. Change the background color to a gradient. (taken from rendercontrol) Disable the transparency checkbox everywhere but Linux since it usually will not work. (too much hassle with platform specifics like frameless windows, etc.) Change-Id: I21488386cddc5841a2bdc8104e7abb197b075b0d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp')
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
index 51b2a27d44..9ff7f1beb4 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
+++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
@@ -105,8 +105,10 @@ MainWindow::MainWindow()
m_checkboxTransparent = new QCheckBox(tr("Transparent background in QQuickWidget"));
connect(m_radioWidget, &QCheckBox::toggled, m_checkboxTransparent, &QWidget::setEnabled);
+#ifdef Q_OS_LINUX
connect(m_checkboxTransparent, &QCheckBox::toggled, this, &MainWindow::onTransparentChanged);
layout->addWidget(m_checkboxTransparent);
+#endif
setLayout(layout);
@@ -184,7 +186,7 @@ void MainWindow::updateView()
if (m_currentRootObject) {
m_currentRootObject->setProperty("currentText", text);
m_currentRootObject->setProperty("multisample", m_checkboxMultiSample->isChecked());
- m_currentRootObject->setProperty("color", QColor(m_transparent ? Qt::transparent : Qt::darkCyan));
+ m_currentRootObject->setProperty("translucency", m_transparent);
}
m_overlayLabel->raise();