summaryrefslogtreecommitdiffstats
path: root/examples/webengine/quicknanobrowser
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2017-06-08 15:48:55 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2017-10-05 08:48:51 +0000
commit4c1cde9a1909162fbddeabd958a5f5acc43c83d6 (patch)
tree2e0a1c0117f16a7cc0b2c5729e14cf32a7fb0532 /examples/webengine/quicknanobrowser
parent3be9a0591f2cf0dac2efa79ea3f2a606afebb5b4 (diff)
Implement geometryChangeRequested signal in the Quick API
Chromium includes the size of the frame in the requested geometry, but QWindow::setGeometry() and the related properties of QML Window expect a size without frame. This patch - fixes the geometry handling in Demobrowser example. - implements a new signal in the QML API which sends both frameless and extended geometries to the application, because QML doesn't have capability to determine the size of the frame and handle extended geometry correctly. Task-number: QTBUG-51181 Change-Id: I8595593aecca33d7cd46986c7abbad0cc7c18ec2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'examples/webengine/quicknanobrowser')
-rw-r--r--examples/webengine/quicknanobrowser/BrowserDialog.qml12
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserDialog.qml b/examples/webengine/quicknanobrowser/BrowserDialog.qml
index d060e2828..770cfee6a 100644
--- a/examples/webengine/quicknanobrowser/BrowserDialog.qml
+++ b/examples/webengine/quicknanobrowser/BrowserDialog.qml
@@ -50,11 +50,12 @@
import QtQuick 2.1
import QtQuick.Window 2.2
-import QtWebEngine 1.2
+import QtWebEngine 1.7
Window {
+ id: window
property alias currentWebView: webView
- flags: Qt.Dialog
+ flags: Qt.Dialog | Qt.WindowStaysOnTopHint
width: 800
height: 600
visible: true
@@ -62,5 +63,12 @@ Window {
WebEngineView {
id: webView
anchors.fill: parent
+
+ onGeometryChangeRequested: {
+ window.x = geometry.x
+ window.y = geometry.y
+ window.width = geometry.width
+ window.height = geometry.height
+ }
}
}