Qt打印预览的问题
void MainWindow::filePrintPreview (){ QPrinter printer(QPrinter::HighResolution); QPrintPreviewDialog preview(&printer, this); connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*))); preview.exec ();}void MainWindow::printPreview (QPrinter *printer){ textEdit->print(printer);}