Notepad++ generated in local folder (no need)
parent
deed629adc
commit
63b8c7c435
|
|
@ -1,19 +0,0 @@
|
||||||
import base
|
|
||||||
|
|
||||||
from PyQt6.QtWebChannel import QWebChannel
|
|
||||||
from PyQt6.QtWebEngineWidgets import QWebEngineView
|
|
||||||
from PyQt6.QtCore import QUrl
|
|
||||||
|
|
||||||
class Browser(QWebEngineView):
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
self.channel = QWebChannel()
|
|
||||||
|
|
||||||
def addObject(self, id, call_handler):
|
|
||||||
self.handler = call_handler
|
|
||||||
self.channel.registerObject(id, self.handler)
|
|
||||||
self.page().setWebChannel(self.channel)
|
|
||||||
|
|
||||||
def loadContent(self, type):
|
|
||||||
print(base.data["default_template_dir"]+type+".html"))
|
|
||||||
self.load(QUrl.fromLocalFile(base.data["default_template_dir"]+type+".html"))
|
|
||||||
Loading…
Reference in New Issue