[PyQt] pyqt AttributeError: 'QWebEngineSettings' object has no attribute 'setUnknownUrlSchemePolicy'

Zhao Lee redstone-cold at 163.com
Sun Oct 28 10:48:25 GMT 2018


PyQt 5.10.1 on Windows 7 32bit
I can't to upgrade to solve the problem , because 
Note that for v5.11 and later the 32-bit Windows wheels do not contain the WebEngine modules.




在2018年10月28 18时03分, "Florian Bruhin"<me at the-compiler.org>写道:

On Sun, Oct 28, 2018 at 11:55:55AM +0800, Zhao Lee wrote:
> pyqt AttributeError: 'QWebEngineSettings' object has no attribute 'setUnknownUrlSchemePolicy'
> however  http://doc.qt.io/qt-5/qwebenginesettings.html#setUnknownUrlSchemePolicy

Works fine here:

   >>> from PyQt5.QtWidgets import QApplication
   >>> from PyQt5.QtWebEngineWidgets import QWebEngineSettings
   >>> a = QApplication([])
   >>> s = QWebEngineSettings.defaultSettings()
   >>> s.setUnknownUrlSchemePolicy(QWebEngineSettings.DisallowUnknownUrlSchemes)
   >>>

Are you sure you're using Qt and PyQt 5.11 or newer?

Florian

--
https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
  GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
        I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20181028/93212f40/attachment.html>


More information about the PyQt mailing list