Google not loading in QtWebkit



  • While using the sample fancybrowser provided in the ancient Qt 4.8.6, google.com is not loading completely. It gets stuck at 50% or 10% or something else. But not 100%. Even if i click on some links in the google homepage, the app hangs for sometime and come backs live after some time. My end requirement is to display google maps using a HTML page. I have an ARM platform.
    I am not getting anywhere trying to solve this issue.
    Qt version : 4.8.6
    Webkit version : 2.3.4

    Thank you for your time.



  • Qt 4 and QtWebKit 2.3.4 are not supported anymore. Use Qt 5. I highly doubt that modern version of Google maps can work in QtWebKit 2.3 at all, its browser engine is 5 years old.

    That said, you can use web inspector to see, what is going on, e.g. which network requests hang, or JS execution blocks the progress, etc.



  • @Kart
    Be aware that once you move as per @Konstantin-Tokarev to Qt 5, at 5.7 onward you will need from QtWebKit to QtWebEngine. This is not too bad, but there are some changes in approach which may be required in your code. See:
    http://wiki.qt.io/QtWebEngine/Porting_from_QtWebKit
    http://blog.qt.io/blog/2013/09/12/introducing-the-qt-webengine/

    I note from https://www.phoronix.com/scan.php?page=news_item&px=QtWebKit-May-2017 that @Konstantin-Tokarev is "The Man" keeping QtWebKit going, apparently, but I guess he's not offering a fix in his for your issue!



  • @JNBarchan Not really. Use latest QtWebKit from https://github.com/annulen/webkit/releases/tag/qtwebkit-5.212.0-alpha2 with Qt 5 should be enough to fix the problem



  • @Konstantin-Tokarev
    OIC. I upgraded an existing application from QtWebKit to QtWebEngine when I moved to Qt 5.7. Doubtless you have your reasons for continuing to support QtWebKit. It's up to the OP then.



  • Hi @Konstantin-Tokarev and @JNBarchan,
    Right now I am trying on an x86 embedded device. I have a Qt 4.8.6 kit for x86 with frame buffer support. But the same issue exists.
    I have another Qt 4.8.6 kit with same webkit 2.3.4 having a x11 support that I am running on my Ubuntu 12.04 (yeah I am a stone age guy).
    There the google maps works absolutely fine. So am I missing something on my embedded device ? Or do I have to really move on to Qt5 ?

    I am not against Qt5 or anything. I already have cross compiled Qt5.9.2. But I haven't yet ported my project to Qt5. Can we call it plan B ?

    Unfortunately "web inspector" is a new word for me. Could you please give me any information on how to use web inspector on an embedded device or how to integrate with Qt ?

    Thank you.



  • @Kart said in Google not loading in QtWebkit:

    Hi @Konstantin-Tokarev and @JNBarchan,
    Right now I am trying on an x86 embedded device. I have a Qt 4.8.6 kit for x86 with frame buffer support. But the same issue exists.
    I have another Qt 4.8.6 kit with same webkit 2.3.4 having a x11 support that I am running on my Ubuntu 12.04 (yeah I am a stone age guy).
    There the google maps works absolutely fine. So am I missing something on my embedded device ? Or do I have to really move on to Qt5 ?

    • It can be that your QtWebKit configuration that you have on desktop doesn't exactly match your configuration on device. E.g. desktop version uses system libxml2 by default when building, while your embedded version may be built without libxml2 and use QXmlStreamReader instead (which may result in bugs)
    • There may be differences in hardware between you embedded system and PC. For example, does your embedded system support SSE2?

    I am not against Qt5 or anything. I already have cross compiled Qt5.9.2. But I haven't yet ported my project to Qt5. Can we call it plan B ?

    Unfortunately "web inspector" is a new word for me. Could you please give me any information on how to use web inspector on an embedded device or how to integrate with Qt ?

    Do setProperty("_q_webInspectorServerPort", 1234) for QWebPage object, and connect from other WebKit browser to that port (1234 in this case)

    Thank you.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.