-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.12.5, 5.14.2
-
None
-
MSVC2017 32bit, Windows 10, QtCreator, MV C++ Compiler 14.0 (x86)
In some circumstances we have incorrect behaviour regarding zoomFactor property in QML WebEngineView. We have a case where we need double setting of the value for the value accepting.
Example 1:
WebEngineView { id: webEngineView Timer { interval: 1000 running: true repeat: true property int count: 0 property var zoomValues: [1.0, 1.1, 1.2, 1.3, 1.4, 1.5] onTriggered: { ++count; var oldValue = webEngineView.zoomFactor; // Try to set the value once webEngineView.zoomFactor = zoomValues[count % zoomValues.length]; console.log(oldValue, webEngineView.zoomFactor, oldValue === webEngineView.zoomFactor ? "ERR" : "OK"); } } }
For this code, sometimes we can see "ERR" in the logs. It means that we tried to change zoomFactor value, but the value was not accepted. Moreover, we can detect some regularity in this behaviour: the value is not acceptable only once when we changed a direction of zoom factors: 1.5 -> 1.0 in our case.
Example 2:
WebEngineView { id: webEngineView Timer { interval: 1000 running: true repeat: true property int count: 0 property var zoomValues: [1.0, 1.1, 1.2, 1.3, 1.4, 1.5] onTriggered: { ++count; var oldValue = webEngineView.zoomFactor; // Try to set the value twice webEngineView.zoomFactor = zoomValues[count % zoomValues.length]; webEngineView.zoomFactor = zoomValues[count % zoomValues.length]; console.log(oldValue, webEngineView.zoomFactor, oldValue === webEngineView.zoomFactor ? "ERR" : "OK"); } } }
In this case we try to set the value twice. For this code, we have "OK" in the logs for all checks.