We need to create & destroy instances of QApplication, as we want to use Qt in a plug-in to an existing host application.
void multiQT()
{
int argc = 0;
QApplication app(argc, NULL);
QWebView view;
view.setHtml("<html><head><title>Title</title></head><body><h1>Hello World</h1></body></html>");
view.show();
app.exec();
}
main(int argc, char** argv)
{
// First call works fine, QWebView renders the HTML just fine
multiQT();
// Second call fails, QWebView strips HTML tags from HTML text and
// and renders "TitleHello World"
multiQT();
}
When showing the QWebView the second time, it does not render the HTML properly. Do we need to do some additional (re-)initializations in QApplication or QWebView?