0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-25 00:54:39 +03:00

Merge pull request #392 from emil-sawicki9/feature/modal-preview-window

Set render preview window to be modal
This commit is contained in:
Alexander Arin 2022-03-20 21:39:56 +03:00 committed by GitHub
commit 34420cd9cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -492,7 +492,7 @@ bool ReportEnginePrivate::showPreviewWindow(ReportPages pages, PreviewHints hint
Q_UNUSED(printer) Q_UNUSED(printer)
if (pages.count()>0){ if (pages.count()>0){
Q_Q(ReportEngine); Q_Q(ReportEngine);
PreviewReportWindow* w = new PreviewReportWindow(q, 0, settings()); PreviewReportWindow* w = new PreviewReportWindow(q, QApplication::activeWindow(), settings());
w->setWindowFlags(Qt::Dialog|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint| Qt::WindowMinMaxButtonsHint); w->setWindowFlags(Qt::Dialog|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint| Qt::WindowMinMaxButtonsHint);
w->setAttribute(Qt::WA_DeleteOnClose,true); w->setAttribute(Qt::WA_DeleteOnClose,true);
w->setWindowModality(Qt::ApplicationModal); w->setWindowModality(Qt::ApplicationModal);