Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
6.6.1
-
None
-
Python 3.12
-
-
80fac314f (dev), ab4488b00 (dev), 3eb00f380 (6.7), 1570bf0a3 (6.7), 806a32f43 (dev), 8d5b1bdf2 (dev), 4a3d0e9bf (dev), 5b8ce3933 (dev), 19f78dfd6 (6.7), 360d9b7d5 (6.7), fb40c3687 (6.7), 60bec1733 (6.7), d66b276df (dev), 3b69819ee (6.7), 5b19cf6ab (dev)
Description
Hi,
When creating a subclass of QWebEnginePage:
class WebEnginePage(QWebEnginePage):
def javaScriptPrompt(self, url, msg, param):
return super().javaScriptPrompt(url, msg, param)
I got this error:
TypeError: WebEnginePage.javaScriptPrompt() takes 4 positional arguments but 5 were given
Which does not conform to the method specification in the pyi file:
def javaScriptPrompt(self, securityOrigin: Union[PySide6.QtCore.QUrl, str], msg: str, defaultValue: str) -> Tuple[bool, str]: ...
virtual protected bool QWebEnginePage::javaScriptPrompt(const QUrl &securityOrigin, const QString &msg, const QString &defaultValue, QString *result)