Skip to content

Commit 87af5da

Browse files
authored
Fix gui svg path on windows
Fix https://github.com/QGEP/qgepplugin/issues/17
1 parent f95f8af commit 87af5da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gui/qgepplotsvgwidget.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ def __init__(self, parent, network_analyzer: QgepGraphManager, url: str=None):
8181

8282
layout = QVBoxLayout(self)
8383
if url is None:
84-
default_url = os.path.abspath(os.path.join(plugin_root_path(), 'svgprofile', 'index.html'))
84+
# Starting with QGIS 3.4, QWebView requires paths with / even on windows.
85+
default_url = plugin_root_path().replace('\\', '/') + '/svgprofile/index.html'
8586
url = settings.value("/QGEP/SvgProfilePath", default_url)
86-
url = 'file://' + url
87+
url = 'file:///' + url
8788

8889
developer_mode = settings.value("/QGEP/DeveloperMode", False, type=bool)
8990

0 commit comments

Comments
 (0)