def __init__(self, parent: WalletWizard) -> None: super().__init__(parent) self.setTitle(_("Release Notes")) release_html = read_resource_text("wallet-wizard", "release-notes.html") widget = QTextBrowser() widget.document().setDocumentMargin(15) widget.setOpenExternalLinks(True) widget.setAcceptRichText(True) widget.setHtml(release_html) layout = QVBoxLayout() layout.addWidget(widget) self.setLayout(layout)
def __init__(self, parent: QWizardPage, title: str, help_file_name: str) -> None: WindowModalDialog.__init__(self, parent) self.setWindowTitle(f"Wallet Wizard - Help for {title}") self.setMinimumSize(450, 400) release_html = read_resource_text("wallet-wizard", f"{help_file_name}.html") widget = QTextBrowser() widget.document().setDocumentMargin(15) widget.setOpenExternalLinks(True) widget.setAcceptRichText(True) widget.setHtml(release_html) vbox = QVBoxLayout(self) # vbox.setSizeConstraint(QVBoxLayout.SetFixedSize) vbox.addWidget(widget) vbox.addLayout(Buttons(OkButton(self)))
def __init__(self, parent: QWidget, title: str, help_dirname: str, help_file_name: str) -> None: super().__init__(parent) self.setWindowTitle(_("ElectrumSV - Help for {}").format(title)) self.setMinimumSize(450, 400) release_html = read_resource_text(help_dirname, f"{help_file_name}.html") widget = QTextBrowser() widget.document().setDocumentMargin(15) widget.setOpenExternalLinks(True) widget.setAcceptRichText(True) widget.setHtml(release_html) vbox = QVBoxLayout(self) vbox.addWidget(widget) vbox.addLayout(Buttons(OkButton(self)))