How to get website content from QWebEnginePage?

Viewed 3462

I installed the newest version of Qt (on Webkit, Qt5.2 had WTFcrash). I try to get content of my website when the page is loaded (and it is):

QString sHtml;
view.page()->toHtml([&](const QString& result){sHtml = result;qDebug() << result;});

But sHtml is empty, and debug not called. What am I doing wrong?

2 Answers
Related