Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. WebView not loading after fail first
QtWS25 Last Chance

WebView not loading after fail first

Scheduled Pinned Locked Moved Solved Qt WebKit
10 Posts 2 Posters 3.2k 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.
  • McLionM Offline
    McLionM Offline
    McLion
    wrote on last edited by
    #1

    Hi

    I'm using QWebView to display webpages with webGUI->load(QUrl(url));

    This works as expected and loadFinished() returns the status.
    If it returns a fail I'd like to set it to load the page again up to a limited number of retries - this is all done by my surrounding code.

    However, on the second load it never returns, saying loadFinished() is never triggered.
    Is there something else I need to do except issuing the very same load command again?
    I'm using a rather old version that is part of my Qt4.6.3.

    Thanks
    McL

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Konstantin Tokarev
      wrote on last edited by
      #2

      QtWebKit shipped with 4.6 is really old and may contain lots of bugs fixed since that age, so you should really upgrade

      If you are hard stuck to Qt 4.6 for some reason, you can try building QtWebKit from Qt 4.7 (aka QtWebKit 2.0.0) for your Qt

      McLionM 1 Reply Last reply
      0
      • K Konstantin Tokarev

        QtWebKit shipped with 4.6 is really old and may contain lots of bugs fixed since that age, so you should really upgrade

        If you are hard stuck to Qt 4.6 for some reason, you can try building QtWebKit from Qt 4.7 (aka QtWebKit 2.0.0) for your Qt

        McLionM Offline
        McLionM Offline
        McLion
        wrote on last edited by
        #3

        @Konstantin-Tokarev
        Yes, I am stuck to 4.6.3 for this project. This is a dev kit I did not put together myself. It also uses directFB with HW-specific drivers to use the HW available in the SoC it runs on.

        I'd love to update QtWebKit because it has so many issues I always face and stumble over.

        Does the version from 4.7 expose the very same API? I mean, do you know if it is likely to be able to patch the WebKit sources only and it will compile and run?

        McLionM K 2 Replies Last reply
        0
        • McLionM McLion

          @Konstantin-Tokarev
          Yes, I am stuck to 4.6.3 for this project. This is a dev kit I did not put together myself. It also uses directFB with HW-specific drivers to use the HW available in the SoC it runs on.

          I'd love to update QtWebKit because it has so many issues I always face and stumble over.

          Does the version from 4.7 expose the very same API? I mean, do you know if it is likely to be able to patch the WebKit sources only and it will compile and run?

          McLionM Offline
          McLionM Offline
          McLion
          wrote on last edited by
          #4

          @McLion
          Actually, I just found that I don't have the sources for the current version used.
          There are libQtWebKit.* only.
          So, would I build the later version and replace these lib's, or ...?

          1 Reply Last reply
          0
          • McLionM McLion

            @Konstantin-Tokarev
            Yes, I am stuck to 4.6.3 for this project. This is a dev kit I did not put together myself. It also uses directFB with HW-specific drivers to use the HW available in the SoC it runs on.

            I'd love to update QtWebKit because it has so many issues I always face and stumble over.

            Does the version from 4.7 expose the very same API? I mean, do you know if it is likely to be able to patch the WebKit sources only and it will compile and run?

            K Offline
            K Offline
            Konstantin Tokarev
            wrote on last edited by
            #5

            @McLion said in WebView not loading after fail first:

            Does the version from 4.7 expose the very same API? I mean, do you know if it is likely to be able to patch the WebKit sources only and it will compile and run?

            I suppose it should build unmodified

            McLionM 1 Reply Last reply
            0
            • K Konstantin Tokarev

              @McLion said in WebView not loading after fail first:

              Does the version from 4.7 expose the very same API? I mean, do you know if it is likely to be able to patch the WebKit sources only and it will compile and run?

              I suppose it should build unmodified

              McLionM Offline
              McLionM Offline
              McLion
              wrote on last edited by McLion
              #6

              @Konstantin-Tokarev
              I'll think about trying to update to 4.7.x.
              Is 4.7.x the latest that is close to the current 4.6 version where I do have a great chance of it simply running?

              However, in the meantime I need to have an immediate solution as a patch.
              I found that when I issue a new load() using my external (serial, in a separate thread) command, it then always returns correctly with a failed.
              If I catch the first failed in the loadFinished() signal and issue a new load() right from there, this second load() never returns.
              I tried everything and I'm out of ideas. Do you have any idea what could make a difference between issuing the very same load() using the external command or directly from within the loadFinished() - or is that the issue, that loadFinished() needs to end before a new load can be sent to the webView?

              K 1 Reply Last reply
              0
              • McLionM Offline
                McLionM Offline
                McLion
                wrote on last edited by
                #7

                I solved it :-)
                When the new load() is called from within loadFinished() that returned a false, then the webView does not accept the new load() and hangs forever until sometime later a new load() is called.

                I ended up in emitting a signal that uses a QueuedConnection from within loadFinished() to allow it to finish before the webView gets a new load() .... et voila.

                btw: I'm still interested in getting inputs to upgrade WebKit with "minimal" changes to the rest of my application.

                1 Reply Last reply
                0
                • McLionM McLion

                  @Konstantin-Tokarev
                  I'll think about trying to update to 4.7.x.
                  Is 4.7.x the latest that is close to the current 4.6 version where I do have a great chance of it simply running?

                  However, in the meantime I need to have an immediate solution as a patch.
                  I found that when I issue a new load() using my external (serial, in a separate thread) command, it then always returns correctly with a failed.
                  If I catch the first failed in the loadFinished() signal and issue a new load() right from there, this second load() never returns.
                  I tried everything and I'm out of ideas. Do you have any idea what could make a difference between issuing the very same load() using the external command or directly from within the loadFinished() - or is that the issue, that loadFinished() needs to end before a new load can be sent to the webView?

                  K Offline
                  K Offline
                  Konstantin Tokarev
                  wrote on last edited by
                  #8

                  @McLion said in WebView not loading after fail first:

                  @Konstantin-Tokarev
                  I'll think about trying to update to 4.7.x.
                  Is 4.7.x the latest that is close to the current 4.6 version where I do have a great chance of it simply running?

                  Maybe you can compile QtWebKit 2.1 too, though officially it was released only for Symbian.

                  However, in the meantime I need to have an immediate solution as a patch.
                  I found that when I issue a new load() using my external (serial, in a separate thread) command, it then always returns correctly with a failed.
                  If I catch the first failed in the loadFinished() signal and issue a new load() right from there, this second load() never returns.
                  I tried everything and I'm out of ideas. Do you have any idea what could make a difference between issuing the very same load() using the external command or directly from within the loadFinished() - or is that the issue, that loadFinished() needs to end before a new load can be sent to the webView?

                  No idea, WebKit is a complex piece of software, and you are using extremely obsolete version of it

                  McLionM 1 Reply Last reply
                  0
                  • K Konstantin Tokarev

                    @McLion said in WebView not loading after fail first:

                    @Konstantin-Tokarev
                    I'll think about trying to update to 4.7.x.
                    Is 4.7.x the latest that is close to the current 4.6 version where I do have a great chance of it simply running?

                    Maybe you can compile QtWebKit 2.1 too, though officially it was released only for Symbian.

                    However, in the meantime I need to have an immediate solution as a patch.
                    I found that when I issue a new load() using my external (serial, in a separate thread) command, it then always returns correctly with a failed.
                    If I catch the first failed in the loadFinished() signal and issue a new load() right from there, this second load() never returns.
                    I tried everything and I'm out of ideas. Do you have any idea what could make a difference between issuing the very same load() using the external command or directly from within the loadFinished() - or is that the issue, that loadFinished() needs to end before a new load can be sent to the webView?

                    No idea, WebKit is a complex piece of software, and you are using extremely obsolete version of it

                    McLionM Offline
                    McLionM Offline
                    McLion
                    wrote on last edited by
                    #9

                    @Konstantin-Tokarev said in WebView not loading after fail first:

                    No idea, WebKit is a complex piece of software, and you are using extremely obsolete version of it

                    I solved that one. See my post #7 above yours.
                    Thanks anyway.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      Konstantin Tokarev
                      wrote on last edited by
                      #10

                      Oh, great, I've missed your reply :)

                      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