They are several errors in the procedure above,

You create two webviews... First in a widget and second by calling parent createWindow(). Use only one of this constructor and "return" the pointer ...

Qt Code:
  1. QWebView * WebView::createWindow ( QWebPage::WebWindowType type ) {
  2. QWebView *appletview = new QWebView(NULL);
  3. // ...
  4. return appletView;
  5. }
To copy to clipboard, switch view to plain text mode 

Instead of made a show() call in the createWindow function, try to do it on the loadFinished() signal. This reduce flickering of your page when the window open and draw the content of the page...

Qt Code:
  1. WebView::WebView(QWidget * parent)
  2. :QWebView(parent)
  3. {
  4. hide();
  5. ...
  6. connect(this, SIGNAL(loadFinished(bool)), this, SLOT(onPageLoadFinished(bool)));
  7. }
  8.  
  9. void WebView::onPageLoadFinished(bool value)
  10. {
  11. show();
  12. }
To copy to clipboard, switch view to plain text mode