Skip to content

Conversation

@butlerpd
Copy link
Member

@butlerpd butlerpd commented Jun 9, 2025

Description

Trying to see if loading PDF into Qt browser will make things easier

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)

Licencing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

butlerpd added 5 commits June 5, 2025 01:09
Changes were:
qtgui/Utilities/DocViewWidget.py/DocViewWidow
234+	settings.setAttribute(web_view.settings().PluginsEnabled, True)
235+	settings.setAttribute(web_view.settings().PdfViewerEnabled, True)

qtgui/MainWindow/GuiManager.py
1330 -	webbrowser.open("https://www.sasview.org/docs/user/tutorial.html")
1330+	tutorialfile = “/user/tutorial.html”
1331 +	self.showHelp(tutorialfilel)
Just had to capture the download request signal and accept it. However python files to not seem to actually download. Also our implementatin of QtWebEngine makes the download so silent the use thinks nothing is happening so added a logging.warning to force the log explorer open and a message generated
@butlerpd butlerpd changed the base branch from main to release-6.1.0 June 9, 2025 00:49
Note this does not enable the tutorials to be loaded into the viewer. They are still html programmed as forced downloaded somewhere in the build system
@butlerpd butlerpd marked this pull request as draft June 9, 2025 02:16
@butlerpd
Copy link
Member Author

butlerpd commented Jun 9, 2025

This now will render PDF links rather than downloading, as long as the html code does not force a download. The current build system/sphinx system are in fact coding the html for forced downloads.

Whether viewing before downloading is preferable is also a question given that downloading from the viewer is not obvious (requires the context sensitive right click menu).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants