Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Custom error page for QtWebEngine
Forum Updated to NodeBB v4.3 + New Features

Custom error page for QtWebEngine

Scheduled Pinned Locked Moved Unsolved QtWebEngine
4 Posts 2 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    popov895
    wrote on last edited by
    #1

    Is there any way to set a custom error page for QtWebEngine? Or maybe there is some way to get the error status code when QWebEnginePage emits loadFinished(false)?

    JonBJ 1 Reply Last reply
    0
    • P popov895

      Is there any way to set a custom error page for QtWebEngine? Or maybe there is some way to get the error status code when QWebEnginePage emits loadFinished(false)?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by JonB
      #2

      @popov895

      Or maybe there is some way to get the error status code when QWebEnginePage emits loadFinished(false)?

      Good question! Does https://stackoverflow.com/questions/40309105/capture-server-response-with-qwebengineview give you any help/leads for getting at the status code? It's useful reading anyway.

      EDIT Hmm, https://stackoverflow.com/questions/51656117/how-to-get-http-status-codes-from-qt-qwebengineview talks about trying QWebEngineUrlRequestInterceptor but I think no luck. Again you should read because it looks like others are having same problem as you getting at the HTTP code. And http://code.qt.io/cgit/qt/qtwebengine.git/tree/src/webenginewidgets/api/qwebenginepage.cpp#n367 might be useful.

      P 1 Reply Last reply
      0
      • JonBJ JonB

        @popov895

        Or maybe there is some way to get the error status code when QWebEnginePage emits loadFinished(false)?

        Good question! Does https://stackoverflow.com/questions/40309105/capture-server-response-with-qwebengineview give you any help/leads for getting at the status code? It's useful reading anyway.

        EDIT Hmm, https://stackoverflow.com/questions/51656117/how-to-get-http-status-codes-from-qt-qwebengineview talks about trying QWebEngineUrlRequestInterceptor but I think no luck. Again you should read because it looks like others are having same problem as you getting at the HTTP code. And http://code.qt.io/cgit/qt/qtwebengine.git/tree/src/webenginewidgets/api/qwebenginepage.cpp#n367 might be useful.

        P Offline
        P Offline
        popov895
        wrote on last edited by
        #3

        @JonB Thanks for your reply, but I have no idea how to use your latest link to solve my problem.

        JonBJ 1 Reply Last reply
        0
        • P popov895

          @JonB Thanks for your reply, but I have no idea how to use your latest link to solve my problem.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by
          #4

          @popov895
          If by "your latest link" you mean http://code.qt.io/cgit/qt/qtwebengine.git/tree/src/webenginewidgets/api/qwebenginepage.cpp#n367, I am suggesting you examine that source code to understand what Qt is actually doing in loadFinished(false), e.g. at first glance it does not seem to be passing errorCode/errorDescription on to the emitted signal. I know nothing, but it does test settings->testAttribute(QWebEngineSettings::ErrorPageEnabled), so maybe that gives a clue that there is some access to an error page?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved