fix:print preview resolution is too low

This commit is contained in:
yifang 2022-01-27 00:47:27 +08:00
parent c3741ee696
commit 2e5ca5f70f
No known key found for this signature in database
GPG key ID: 8765B97BD0EC1AC4

View file

@ -3409,7 +3409,8 @@ void MainWindow::on_pageSetup_triggered()
void MainWindow::on_printPreview_triggered() void MainWindow::on_printPreview_triggered()
{ {
QPrintPreviewDialog dialog( &getPrinter(), this ); QPrinter printer;
QPrintPreviewDialog dialog( &printer, this );
connect( &dialog, SIGNAL( paintRequested( QPrinter * ) ), connect( &dialog, SIGNAL( paintRequested( QPrinter * ) ),
this, SLOT( printPreviewPaintRequested( QPrinter * ) ) ); this, SLOT( printPreviewPaintRequested( QPrinter * ) ) );