How can I display html generated by plotly using QWebview in Qt4

I have got some html files generated using plotly python.
I want to view these html using QWebView in Qt4 GUI.

QWebView* view=new QWebView();
view->setHtml(some text);
// or view->load(QUrl::fromLocalFile(path));

But this just doesnโ€™t work.
Does anyone know how to make it work?