Werid problem of QTWebkit in QT4.8.0

  • Hello All,

    I am a freshman in QT.
    Recently I am working on a idea that to grab the information from websites and I choose qtwebkit as my web render engine and js engine.
    But now I am facing a werid problem maybe something do with the rendering of the document after loading a url.
    I use webpage->mainframe()->loadUrl(%any url%) and connect the loadFinished(bool) signal with my own slot(for example finishLoading).
    In the finishLoading slot I tried to find a web element with code below:

    @QWebElement e = page->mainFrame()->findFirstElement("#Rent_City");@

    But for this same code, the behaviours are different in 4.7.4 and 4.8.0.
    For 4.7.4, the application would find this web element smoothly without any problem.
    But for 4.8.0, I have tried many times but the return web element still is null. I also have tried to wait for many seconds before find the web element but it didn't work.
    My release is dll and the template have set to lib.
    Dramatically, while I build it into a exe, everything runs OK even build with 4.8.0.
    So I don't know what happen and have searched many information but not help.

    Can somebody help me to trouble shooting this problem? Many thanks.

Log in to reply

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