Qt6 topics merged with General

QWebView onLoadFinished not always called

  • Hi all,

    I have an application with QWebView and I connect the onLoadFinished slot like the following:

    @ connect(ui->webView, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)),Qt::DirectConnection);

    I load the page in the constructor of the MainWindow. Loading works good, I see that the page loads fine. However, onLoadFinished is not called always. It is called every time in the following scenario,
    The first page loads but no LoadFinished called even if I wait a long time. If I click on a link on the loaded page, I see the the LoadFInished is called immediately for the previous page. So, it is like, page waits for something which is preventing it from finished, whenever I click on a link, it causes to cancel (finish) the page. Therefore, the function is called.

    Strange enough, this phenomena doesn't happen with youtube. So I suspect something with the website. Do you guys have any idea?

Log in to reply