Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Web page loading acceleration



  • Hey, everybody,
    I'm developing a web browser.
    Here's my simple code:

    #include "controleur.h"
    #include <QWebEngineProfile>
    #include <QWebEngineSettings>
    
    Controleur::Controleur(QWidget *parent) :
        QWidget(parent)
    {
        setupUi(this);
    
        page = new QWebEngineView(this);
        page->settings()->setAttribute(QWebEngineSettings::AllowRunningInsecureContent,true);
    
        page->setGeometry(0,0,750,350);
        page->load(QUrl("https://www.google.com"));
    
        connect(page,&QWebEngineView::loadFinished,this,&Controleur::on_loadFinished);
        connect(page,&QWebEngineView::loadProgress,this,&Controleur::on_loadProgress);
        connect(page,&QWebEngineView::loadStarted,this,&Controleur::on_loadStarted);
    
        page->show();
    
    }
    
    void Controleur::on_loadFinished(bool ok)
    {
        status->setText(" Chargement de la page terminée.");
    }
    
    void Controleur::on_loadProgress(int progress)
    {
        bar->setValue(progress);
    }
    
    void Controleur::on_loadStarted()
    {
        status->setText(" Nouvelle charge de la page est démarrée.");
    }
    
    void Controleur::on_precedent_clicked()
    {
        page->page()->triggerAction(QWebEnginePage::Back);
    }
    
    void Controleur::on_actual_clicked()
    {
        page->page()->triggerAction(QWebEnginePage::Reload);
    }
    
    void Controleur::on_suivant_clicked()
    {
        page->page()->triggerAction(QWebEnginePage::Forward);
    }
    

    my problem is, I can't understand why my browser is really slow.
    it can even take 3 minutes to load the page and even after the signal finished(), I have to wait at least 1 minute to be able to click on the link or something else on the page.
    so I'd like to know how I can speed up the loading of my browser?

    Thanks in advance for your help



  • @EL-jos are you sure your connection is not slow?

    I mean, have you tried with a different browser on same machine?

    what about running this minimal example?


Log in to reply