0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00

Set render preview window to be modal

This commit is contained in:
Emil Sawicki 2022-03-15 09:20:52 +01:00
parent 2ccb2faf18
commit bdbb9b6f61

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);