From 87af5daf9cae90f217df3ca67030ac78dede7ccc Mon Sep 17 00:00:00 2001 From: Arnaud Poncet-Montanges Date: Thu, 13 Dec 2018 12:19:24 +0100 Subject: [PATCH] Fix gui svg path on windows Fix https://github.com/QGEP/qgepplugin/issues/17 --- src/gui/qgepplotsvgwidget.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/qgepplotsvgwidget.py b/src/gui/qgepplotsvgwidget.py index 3a5b0309..d8adae4d 100644 --- a/src/gui/qgepplotsvgwidget.py +++ b/src/gui/qgepplotsvgwidget.py @@ -81,9 +81,10 @@ def __init__(self, parent, network_analyzer: QgepGraphManager, url: str=None): layout = QVBoxLayout(self) if url is None: - default_url = os.path.abspath(os.path.join(plugin_root_path(), 'svgprofile', 'index.html')) + # Starting with QGIS 3.4, QWebView requires paths with / even on windows. + default_url = plugin_root_path().replace('\\', '/') + '/svgprofile/index.html' url = settings.value("/QGEP/SvgProfilePath", default_url) - url = 'file://' + url + url = 'file:///' + url developer_mode = settings.value("/QGEP/DeveloperMode", False, type=bool)