0

Hello so i have a BIG problem with QWebViewEngine so far. Because all i did was created a QWebEngineView and said .load(QUrl("http://google.com")) and then .showFullScreen(). On start the application took about 130MB of RAM. When i pressed feel lucky on google and the page loaded suddenly the RAM started to climbing by 200mb each second and it stopped when there was no more free RAM.

Anyone had this problem, or experience with QWebEngineView. I know its Chormium, but it seems to me as if it wasnt working correctly.

Any suggestions how to correct this?

Edited 14/08/2015 14:12 here is the code(note that most of it is commented):

#include "mainwindow.h"
#include <QtWebEngineWidgets/QtWebEngineWidgets>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QScopedPointer>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    view = new QWebEngineView();
    manager = new QNetworkAccessManager();
    settings = new QSettings(":/settings.ini",QSettings::IniFormat);
//    connect(view,SIGNAL(loadFinished(bool)),this,SLOT(CheckPage()));
//    connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(connection(QNetworkReply*)));
//    errorOpen=false;
    settings->beginGroup("URL");
    myUrl = settings->value("curUrl").toString();
    settings->endGroup();
//    view->load(myUrl);
    view->load(QUrl("http://google.com"));
    view->showFullScreen();
    settings->deleteLater();
}

MainWindow::~MainWindow()
{
//    delete view;
//    delete manager;
}
Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
  • I am using QT 5.5 MSVC2013 64bit with MVC++ Compiler 12.0 and Windows SDK 8.1 debugger. Platform is windows and i think its prebuild since i downloaded it off the QT webpage like a setup. – Alexander Baťka Aug 17 '15 at 05:28

1 Answers1

0

I can't reproduce under qt5-mac @5.4.2_1 from macports on OS X 10.9:

//main.cpp
#include <QtWebEngineWidgets>
#include <QApplication>

int main(int argc, char ** argv)
{
   QApplication a(argc, argv);
   QWebEngineView view;
   view.load(QUrl("http://google.com"));
   view.showFullScreen();
   return a.exec();
}
# chromium-32008560.pro
QT       += webenginewidgets
TARGET = chromium-32008560
TEMPLATE = app
SOURCES += main.cpp
Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
  • @AlexanderBaťka So, does the code I posted here reproduce the problem for you? Copy-paste the two files from this question, or check them out using git from https://github.com/KubaO/stackoverflown.git (the answer's number is in the folder name), compile and run. Do you see the problem then? – Kuba hasn't forgotten Monica Aug 17 '15 at 16:23
  • Unfortunatelly yes, i tried this aproach also, but nothing changed :-/ Still it flies like a bird. – Alexander Baťka Aug 18 '15 at 05:16
  • @AlexanderBaťka So you can copy-paste the code from this answer and attach it as a test case in a Qt bug report. It must be a Qt bug - be very careful to provide exact versions of everything that you use (Qt, MSVC, Windows, whether self-built Qt or a binary download and if so wherefrom, etc.) so that it can have a chance of being reproduced. – Kuba hasn't forgotten Monica Aug 18 '15 at 13:18