void SalesList::printDoc(const QString &htmlText) { QWebView * webView = new QWebView; QPrinter * printer = new QPrinter; // Настройка формата печати printer->setOutputFormat(QPrinter::NativeFormat); // По умолчанию ориентация - альбомная printer->setOrientation(QPrinter::Landscape); QPrintPreviewDialog * previewDlg = new QPrintPreviewDialog(printer, this, Qt::WindowMinMaxButtonsHint); connect(previewDlg, SIGNAL(paintRequested(QPrinter *)), webView, SLOT(print(QPrinter*))); webView->setHtml(htmlText.toAscii()); previewDlg->exec();} //void SalesList::printDoc(const QString &htmlText)