Important: Please read the Qt Code of Conduct -

QWebEngineView Adding certificate verification

  • Hi!
    I wont open url in QWebEngineView, but i get error:

    [103262:103307:0603/] CERT_PKIXVerifyCert for failed err=-8172
    InsecureRequestWarning: Unverified HTTPS request is being made to host ''. Adding certificate verification is strongly advised. See:

    How I can open this url?

  • The Simple Browser Example has a section describing how to manage ssl errors.

  • it is work

    import sys
    from PyQt5.QtCore import QUrl
    from PyQt5.QtWidgets import QApplication
    from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage, QWebEngineCertificateError
    # from PyQt5.QtNetwork import QSslSocket
    class WebEnginePage(QWebEnginePage):
        def __init__(self, parent=None):
            super(QWebEnginePage, self).__init__()
        def certificateError(self, error):
            # error.ignoreCertificateError()
            # return True
            return error.isOverridable()
    def main(args):
        app = QApplication(args)
        webview = QWebEngineView()
        page = WebEnginePage()
    if __name__ == "__main__":

Log in to reply