2025-03-05 15:11:01 +01:00

14 lines
378 B
Python

from PyQt6.QtWidgets import QTextBrowser
from ...resources import get_resource_path
class MarkdownView(QTextBrowser):
def __init__(self, path):
super().__init__()
self.setReadOnly(True)
self.filepath = get_resource_path(path)
with open(self.filepath, "r") as file:
content = file.read()
self.setMarkdown(content)