Skip to content

v1.1.2

Choose a tag to compare

@Butterroach Butterroach released this 03 Mar 11:37
· 6 commits to master since this release
2d632d5
  • Fixed HTML links.

The fix was this:

class HtmlWindow(QDialog):
    def __init__(self, html_content, title, parent=None):
        ...
        label.setText(html_content)
        label.linkActivated.connect(self.openLink)
        ...

    def openLink(self, link: str):
        subprocess.Popen(
            [
                "sudo",
                "-u",
                os.getlogin(),
                "python3",
                "-c",
                f"__import__('webbrowser').open('{link}')",
            ]
        ) 

No, I don't know how it works, please don't ask. It works. If it works you don't question it.