"PyQt6.QtWebEngineCore.QWebEngineGlobalSettings.setDnsMode" missing method?
Matic Kukovec
kukovecmatic at hotmail.com
Thu Feb 15 15:59:47 GMT 2024
Excellent, thank you Charles 👍
________________________________
From: Charles <peacech at gmail.com>
Sent: Thursday, February 15, 2024 4:52 PM
To: Matic Kukovec <kukovecmatic at hotmail.com>
Cc: PyQt at riverbankcomputing.com <pyqt at riverbankcomputing.com>
Subject: Re: "PyQt6.QtWebEngineCore.QWebEngineGlobalSettings.setDnsMode" missing method?
It is printed regardless of the dns mode.
To hide the message you can set env `set QT_LOGGING_RULES="*.debug=false"` or call setFilterRules as written in https://doc.qt.io/qt-6/qloggingcategory.html.
I have checked that setting QT_LOGGING_RULES did remove the doh message in my qwebengine app.
On Thu, Feb 15, 2024 at 10:36 PM Matic Kukovec <kukovecmatic at hotmail.com<mailto:kukovecmatic at hotmail.com>> wrote:
Hi,
Specs:
*
Windows 10 x64
* Python 3.12 x64
* PyQt 6.6.1
*
QWebEngine 6.6.0
Running this code:
import PyQt6.QtWebEngineCore
dns_mode = PyQt6.QtWebEngineCore.QWebEngineGlobalSettings.DnsMode()
dns_mode.secureMode = PyQt6.QtWebEngineCore.QWebEngineGlobalSettings.SecureDnsMode.SystemOnly
PyQt6.QtWebEngineCore.QWebEngineGlobalSettings.setDnsMode(dns_mode)
... throws this error:
AttributeError: type object 'QWebEngineGlobalSettings' has no attribute 'setDnsMode'. Did you mean: 'DnsMode'?
This should probably work, right? It's this method: https://doc.qt.io/qt-6/qwebengineglobalsettings.html#setDnsMode
The whole reason for doing this is that I want to remove the message that gets printed when using a QWebEngineView, which is this message:
doh set to "" -- SystemOnly
Or is there a different way to make this message disappear?
Thanks,
Matic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240215/d41ec4fa/attachment-0001.htm>
More information about the PyQt
mailing list