Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.10.0
-
None
-
windows 7-64
Qt creator 4.5.0
Qt 5.10.0
qmake.exe
mingw32
Description
When setting a minimumZoomlevel to a QML map, the lower threshold is exceeded on windows 7, not on Linux.
Here is a simple code based on the minimal map exemple.
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
import QtQuick 2.0 import QtQuick.Window 2.0 import QtLocation 5.6 import QtPositioning 5.6 Window { width: 1440 height: 900 visible: true Map { anchors.fill: parent plugin: Plugin {name: "osm"} center: QtPositioning.coordinate(59.91, 10.75) // Oslo zoomLevel: 10 minimumZoomLevel: 6 //This does not block the zoomLevel onZoomLevelChanged: { console.log("minimumZoomLevel : " + minimumZoomLevel + " - current zoomLevel :" + zoomLevel) } } }
the results are (debug mode) :
qml: minimumZoomLevel : 2.4918530963296748 - current zoomLevel :2.4918530963296748 qml: minimumZoomLevel : 2.4918530963296748 - current zoomLevel :19
So, despite having specified a minimum zoom value, it is overridden and the zoom range goes from 19 to 2.49, instead of 19 to 6.
Tested on two differents computers under windows 7-64. Even reinstall all Qt to brand new 5.10.0 version.