Skip to content

Commit 1faf764

Browse files
authored
PR: Fix bug when importing from PySide6.QtWebEngineCore/QtWebEngineWidgets (QWebEngineScrip vs QWebEngineScript) (#455)
2 parents 6c860ad + 14849f9 commit 1faf764

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

qtpy/QtWebEngineWidgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
from PySide6.QtWebEngineCore import (
6565
QWebEnginePage,
6666
QWebEngineProfile,
67-
QWebEngineScrip,
67+
QWebEngineScript,
6868
QWebEngineSettings,
6969
)
7070
from PySide6.QtWebEngineWidgets import *

qtpy/tests/test_qtwebenginewidgets.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import pytest
2+
from packaging import version
23

3-
from qtpy import PYQT6, PYSIDE6
4+
from qtpy import PYQT5, PYQT6, PYQT_VERSION, PYSIDE2, PYSIDE6, PYSIDE_VERSION
45

56

67
@pytest.mark.skipif(
7-
PYSIDE6 or PYQT6,
8+
not (
9+
(PYQT6 and version.parse(PYQT_VERSION) >= version.parse("6.2"))
10+
or (PYSIDE6 and version.parse(PYSIDE_VERSION) >= version.parse("6.2"))
11+
or PYQT5
12+
or PYSIDE2
13+
),
814
reason="Only available in Qt<6,>=6.2 bindings",
915
)
1016
def test_qtwebenginewidgets():

0 commit comments

Comments
 (0)