summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-05-27 12:02:14 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-05-27 12:09:40 (GMT)
commit962d216ce9f9f1e6bd73fe43e3d2a7c86f64b75f (patch)
tree9fccf497be456fff3cfde4d5b0d0ea07aae0d7af /src/opengl/qgl.cpp
parent71cb35e942b94e4dba2055acdebbf90c352da762 (diff)
downloadQt-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.cpp5
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)