mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Use load instead of setHtml so paths resolve.
Without this we can't resolve local paths to files.
This commit is contained in:
parent
16b52f929c
commit
4a096cb728
@ -15,7 +15,7 @@ from typing import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from PySide2 import QtCore, QtWidgets
|
from PySide2 import QtCore, QtWidgets
|
||||||
from PySide2.QtCore import QLineF, QPointF, QRectF, Qt
|
from PySide2.QtCore import QLineF, QPointF, QRectF, Qt, QUrl
|
||||||
from PySide2.QtGui import (
|
from PySide2.QtGui import (
|
||||||
QBrush,
|
QBrush,
|
||||||
QColor,
|
QColor,
|
||||||
@ -162,7 +162,9 @@ class LeafletMap(QWebEngineView, LiberationMap):
|
|||||||
|
|
||||||
self.page = LoggingWebPage(self)
|
self.page = LoggingWebPage(self)
|
||||||
self.page.setWebChannel(self.channel)
|
self.page.setWebChannel(self.channel)
|
||||||
self.page.setHtml(Path("resources/ui/map/canvas.html").read_text())
|
self.page.load(
|
||||||
|
QUrl.fromLocalFile(str(Path("resources/ui/map/canvas.html").resolve()))
|
||||||
|
)
|
||||||
self.setPage(self.page)
|
self.setPage(self.page)
|
||||||
|
|
||||||
self.loadFinished.connect(self.load_finished)
|
self.loadFinished.connect(self.load_finished)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user