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