summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview_p.h
diff options
context:
space:
mode:
authorJocelyn Turcotte <jturcotte@woboq.com>2015-07-09 21:52:43 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-07-14 13:06:19 +0000
commit99e98f7bf6aec78fe0d647fb898e65d13ff522e4 (patch)
tree64a38d99e5f6287e80f92df1d9ac125cc2325b87 /src/webengine/api/qquickwebengineview_p.h
parent8d6b933a971476abe91e72728d997aa5dd2a71be (diff)
Add a backgroundColor property
This also allows setting a transparent color to see through the web view's body if its background color isn't specified. The color is initially held by the top API view and is pulled by the WebContentsAdapter in order to set it on the RenderView. Since both blink and our local compositors (in the QOpenGLWidget case) need to know about this color, RWHVQt takes care of pushing it to both. The former through an IPC message and the latter directly on the RWHVQtDelegate. Task-number: QTBUG-41960 Change-Id: Ie13317b2d087f5612ad9c5fb0e05ca3e91aec9af Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/webengine/api/qquickwebengineview_p.h')
-rw-r--r--src/webengine/api/qquickwebengineview_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 5db15e873..e26e4f360 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -92,6 +92,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_PROPERTY(QQmlWebChannel *webChannel READ webChannel WRITE setWebChannel NOTIFY webChannelChanged REVISION 1)
Q_PROPERTY(QQmlListProperty<QQuickWebEngineScript> userScripts READ userScripts FINAL)
Q_PROPERTY(bool activeFocusOnPress READ activeFocusOnPress WRITE setActiveFocusOnPress NOTIFY activeFocusOnPressChanged REVISION 2)
+ Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged REVISION 3)
#ifdef ENABLE_QML_TESTSUPPORT_API
Q_PROPERTY(QQuickWebEngineTestSupport *testSupport READ testSupport WRITE setTestSupport FINAL)
@@ -122,6 +123,8 @@ public:
bool isFullScreen() const;
qreal zoomFactor() const;
void setZoomFactor(qreal arg);
+ QColor backgroundColor() const;
+ void setBackgroundColor(const QColor &color);
QQuickWebEngineViewExperimental *experimental() const;
@@ -274,6 +277,7 @@ Q_SIGNALS:
Q_REVISION(1) void profileChanged();
Q_REVISION(1) void webChannelChanged();
Q_REVISION(2) void activeFocusOnPressChanged(bool);
+ Q_REVISION(3) void backgroundColorChanged();
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);