Unsolved QWebEngineView - problem with loading big files
-
Hi,
i am trying to solve problem, with loading big HTML files via QWebEngineView.
HTML contains tables with data, and its larger than 1MB, pure HTML.My code:
page= new QWebEnginePage( ui->webEngineView); ui->webEngineView->setPage( page); QFile f(fileName); if ( f.open(QIODevice::ReadOnly)) { QByteArray b = f.readAll(); // all read, data are present QString s = a; // conversion to string is OK page->setHtml( s); // HTML is shown correctly, when data are about 750kB, when tried to load 1.5MB, or bigger files, it failed without any error }
I used this with legacy QWebView, and it worked, it was slow, but worked. Any guess, how to solve it?
Thanks, Martin
-
setHtml(s)
isn't suitable for big pages, because it converts passed data into Url ofdata:
scheme, so easily can reach Url length limit. Why not useload(url)
function to display such a file? For example:page->load(QUrl::fromLocalFile(fileName));