diff --git a/mainwindow.cc b/mainwindow.cc index 2aeb8b8f..8c1f49b8 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -3409,7 +3409,8 @@ void MainWindow::on_pageSetup_triggered() void MainWindow::on_printPreview_triggered() { - QPrintPreviewDialog dialog( &getPrinter(), this ); + QPrinter printer; + QPrintPreviewDialog dialog( &printer, this ); connect( &dialog, SIGNAL( paintRequested( QPrinter * ) ), this, SLOT( printPreviewPaintRequested( QPrinter * ) ) );