Mercurial > hg > syntilista
changeset 124:a063cb8a171b
Set print preview dialog window modality before initializing progress dialog.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 10 Jul 2017 12:52:35 +0300 |
parents | e76d85ea87ac |
children | 6e2d26e7a0b4 |
files | src/main.cpp |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.cpp Thu Jul 06 15:47:18 2017 +0300 +++ b/src/main.cpp Mon Jul 10 12:52:35 2017 +0300 @@ -551,6 +551,7 @@ // Create print preview dialog and show it QPrintPreviewDialog preview(&printer, this); + preview.setWindowModality(Qt::ApplicationModal); preview.setSizeGripEnabled(true); connect( @@ -573,6 +574,8 @@ 1, this); + progress.setWindowModality(Qt::ApplicationModal); + // Again, get the page info here .. we need the number of lines per page SLPageInfo pinfo; pinfo.npages = 0; @@ -592,11 +595,9 @@ printer->setFromTo(1, pinfo.npages); // Setup rest of the progress dialog here - progress.setWindowModality(Qt::ApplicationModal); progress.setMinimum(printer->fromPage() - 1); progress.setMaximum(printer->toPage()); - // Begin painting to the printer (or preview) QPainter painter; painter.begin(printer);