void BrowserMainWindow::slotViewPageSource(){ if (!currentTab()) return; QString markup = currentTab()->page()->mainFrame()->toHtml(); QPlainTextEdit *view = new QPlainTextEdit(markup); view->setWindowTitle(tr("Page Source of %1").arg(currentTab()->title())); view->setMinimumWidth(640); view->setAttribute(Qt::WA_DeleteOnClose); view->show();}
QString markup = currentTab()->page()->mainFrame()->toHtml();QPlainTextEdit *view = new QPlainTextEdit(markup);