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.0k 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 19 Sept 2018, 14:55 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)?

    J 1 Reply Last reply 19 Sept 2018, 18:05
    0
    • P popov895
      19 Sept 2018, 14:55

      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)?

      J Offline
      J Offline
      JonB
      wrote on 19 Sept 2018, 18:05 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 26 Sept 2018, 07:45
      0
      • J JonB
        19 Sept 2018, 18:05

        @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 26 Sept 2018, 07:45 last edited by
        #3

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

        J 1 Reply Last reply 26 Sept 2018, 07:55
        0
        • P popov895
          26 Sept 2018, 07:45

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

          J Offline
          J Offline
          JonB
          wrote on 26 Sept 2018, 07:55 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

          1/4

          19 Sept 2018, 14:55

          • Login

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