Skip to content

Update Viewer for PyQt6, improve load time #3647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 30, 2025
Merged

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

The implementation of the Model Viewer's extension point for the pyomo command caused Qt (and all the dependent libraries) to be imported when the pyomo command loaded the pyomo.command extension points (taking nearly 14 seconds!). This PR reworks the extension point so that Qt (et al.) are not imported when initializing the pyomo script environment.

This PR also adds support for using PyQt6 (in addition to PySide6 and PyQt5).

Changes proposed in this PR:

  • Rework how the model Viewer is registered with the Pyomo command (split the QtApp out from the command registration)
  • Add support for PyQt6

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@github-project-automation github-project-automation bot moved this from Todo to Reviewer Approved in July 2025 Release Jun 30, 2025
@blnicho blnicho merged commit fe163bf into Pyomo:main Jun 30, 2025
35 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer Approved to Done in July 2025 Release Jun 30, 2025
@jsiirola jsiirola deleted the viewer-pyqt6 branch June 30, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants