From 36786a0d4a6f024bc14258baf9f43ec013d46024 Mon Sep 17 00:00:00 2001 From: Prayag Prajapati Date: Mon, 28 Nov 2022 18:56:39 +0530 Subject: [PATCH] link react with webengine --- jellyplayer/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jellyplayer/__init__.py b/jellyplayer/__init__.py index 03dd48e..2a72fa3 100644 --- a/jellyplayer/__init__.py +++ b/jellyplayer/__init__.py @@ -1,3 +1,4 @@ +from mpv import MPV, MpvRenderContext from ctypes import windll, cast, c_void_p from PySide6.QtWebEngineCore import QWebEngineSettings from PySide6.QtWebEngineWidgets import QWebEngineView @@ -14,7 +15,6 @@ import os os.environ["PATH"] = os.path.dirname( __file__) + os.pathsep + os.environ["PATH"] -from mpv import MPV, MpvRenderContext __version__ = '0.1.0' @@ -64,10 +64,10 @@ class MainWin(QMainWindow): self.dirRaw = os.path.dirname(os.path.realpath(__file__)) self.dir = self.dirRaw.replace("\\", "/") self.view = QWebEngineView() - self.view.load(QUrl("http://localhost:3000")) - # self.view.load(QUrl("http://localhost:17066")) + self.view.load(QUrl("http://localhost:5173")) self.view.raise_() self.setCentralWidget(self.view) + self.setWindowIcon(QIcon(QPixmap(f"{self.dir}/assets/icon.png"))) self.view.settings().setAttribute(QWebEngineSettings.JavascriptEnabled, True)