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

fix #15 Падение превью при удалении активного окна приложения

This commit is contained in:
Arin Alex 2016-03-02 21:17:37 +03:00
parent d8fb71395c
commit dc4075a5b2

View File

@ -291,7 +291,7 @@ void ReportEnginePrivate::previewReport()
ReportPages pages = renderToPages(); ReportPages pages = renderToPages();
dataManager()->setDesignTime(true); dataManager()->setDesignTime(true);
if (pages.count()>0){ if (pages.count()>0){
PreviewReportWindow* w = new PreviewReportWindow(this,QApplication::activeWindow(),settings()); PreviewReportWindow* w = new PreviewReportWindow(this,0,settings());
w->setWindowFlags(Qt::Dialog|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint); w->setWindowFlags(Qt::Dialog|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint);
w->setAttribute(Qt::WA_DeleteOnClose,true); w->setAttribute(Qt::WA_DeleteOnClose,true);
w->setWindowModality(Qt::ApplicationModal); w->setWindowModality(Qt::ApplicationModal);