aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-23 17:44:19 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-28 07:41:36 +0000
commit6fa50ffc31fcca051c73eeaa94116f2667b9ae6b (patch)
treeca4298370d276afe10f1075c50352c80f0e218b6 /examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
parentd37a0145cdec131ef6f689310530ce92c4ba5e05 (diff)
Fix up flawed TranslucentBackground usage in docs and examples
Following the qtbase fixes, start doing things correctly in the QQuickWidget examples too. Remove the checkbox and use a --transparent command line argument (like in hellogl2). In addition --transparent --no_render_alpha can be used to verify the most problematic case: when alpha is present and the backingstore contains semi-transparent pixels in places where the underlying QOpenGLWidget is opaque. Here the result must still be an opaque pixel. This was previously ensured by a glColorMask call, now replaced by glBlendFuncSeparate in QPlatformBackingStore. Task-number: QTBUG-47276 Change-Id: Ia040f899405f73e95e957becee5df43683af9c39 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h')
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
index c58523f675..5b86c93f38 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
+++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
@@ -53,7 +53,7 @@ QT_FORWARD_DECLARE_CLASS(QLayout)
class MainWindow : public QWidget
{
public:
- MainWindow();
+ MainWindow(bool transparency);
protected:
void resizeEvent(QResizeEvent*);
@@ -63,7 +63,6 @@ private slots:
void onStatusChangedView(QQuickView::Status status);
void onStatusChangedWidget(QQuickWidget::Status status);
void onSceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
- void onTransparentChanged(bool enabled);
private:
void switchTo(QWidget *view);
@@ -86,8 +85,6 @@ private:
QSurfaceFormat m_format;
- QCheckBox *m_checkboxTransparent;
-
bool m_transparent;
};