diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-05-27 12:02:14 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-05-27 12:09:40 (GMT) |
commit | 962d216ce9f9f1e6bd73fe43e3d2a7c86f64b75f (patch) | |
tree | 9fccf497be456fff3cfde4d5b0d0ea07aae0d7af /src/opengl/qgl.cpp | |
parent | 71cb35e942b94e4dba2055acdebbf90c352da762 (diff) | |
download | Qt-962d216ce9f9f1e6bd73fe43e3d2a7c86f64b75f.zip Qt-962d216ce9f9f1e6bd73fe43e3d2a7c86f64b75f.tar.gz Qt-962d216ce9f9f1e6bd73fe43e3d2a7c86f64b75f.tar.bz2 |
Make QGLWidgets have the same background colour as QWidgets
QWidgets are filled with Qt::transparent when WA_TranslucentBackground
is set, reguardless of what their background colour has been set to.
This patch makes QGLWidgets behave the same way.
Reviewed-By: Samuel Rødal
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 9626a3d..ced3452 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4530,6 +4530,11 @@ QColor QGLDrawable::backgroundColor() const return QApplication::palette().brush(QPalette::Background).color(); } +bool QGLDrawable::hasTransparentBackground() const +{ + return widget && widget->testAttribute(Qt::WA_TranslucentBackground); +} + QGLContext *QGLDrawable::context() const { if (widget) |