Request you to please look into the above code and correct me where I am doing wrong.
Including the two blatant memory leaks that happen every time the print button is clicked?

Qt Code:
  1. QWebView *view = new QWebView;
  2. QPrintDialog *dlg = new QPrintDialog(&printer,this);
To copy to clipboard, switch view to plain text mode