Skip to content

Bugfix/page import qt5#34

Open
seb5g wants to merge 3 commits into
bec-project:mainfrom
PyMoDAQ:bugfix/page_import_qt5
Open

Bugfix/page import qt5#34
seb5g wants to merge 3 commits into
bec-project:mainfrom
PyMoDAQ:bugfix/page_import_qt5

Conversation

@seb5g
Copy link
Copy Markdown
Contributor

@seb5g seb5g commented May 7, 2026

Description

This PR allows the use of pyqt5 as a backend. The main difference is the import of the QWebEnginePage class from different modules.

Type of Change

  • add pyqt5 optional dependency with pyqt5 package and PyQtWebEngine packages
  • add a try except statement to import QWebEnginePage
  • add a pyqt5 test in the qt matrix

How to test

  • see your usual tests

Potential side effects

nothing

Copy link
Copy Markdown
Member

@wakonig wakonig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! - let's just change it to qtpy's dependency flags and then we merge it.

Comment thread qtmonaco/monaco_page.py Outdated
import logging

from qtpy.QtWebEngineCore import QWebEnginePage
try:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of try/except, I would suggest using qtpy's PYQT5 flag

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, please use "conventional commits" (rather a new feature in this case, so "feat:"). More info can be found here: https://www.conventionalcommits.org/en/v1.0.0/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@wakonig wakonig self-assigned this May 10, 2026
Patch the QWebEnginePage import difference between pyqt5 on one hand and pyqt6/pyside6 on a second hand
@seb5g seb5g requested a review from wakonig May 12, 2026 12:03
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