LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: omaro on May 29, 2020, 10:31:19 PM

Title: previewReport making my main GUI freeze in QML
Post by: omaro on May 29, 2020, 10:31:19 PM
Hi guys, I'm using LimeReport in a QML application, I can run my report easily from C++ but when I run previewReport my main app (gui) freeze I can only use the windows of the previewReport, if I want also to minimize the previewReport all the app is minimized.
Thanks for your help

this my c++ function that I'm using to run the report, I'm executing this function from QML:
Code: [Select]
bool ser_to_qml::printReport_request(QString request)
{
    m_report.dataManager()->setReportVariable("requestnumber", request);
    bool res = m_report.loadFromFile(":/report/RequestDemand.lrxml");
    m_report.setResultEditable(false);
    m_report.previewReport();
    return res;
}
Title: Re: previewReport making my main GUI freeze in QML
Post by: Arin Alex on May 31, 2020, 03:36:43 PM
Hi!
LimeReport opens a modal preview window.
If you want to change this behavior you can use ReportEngine::createPreviewWidget(QObject* parent) to get a preview widget and show it as it convenient for you
Title: Re: previewReport making my main GUI freeze in QML
Post by: omaro on June 01, 2020, 02:22:08 AM
Thank you Alex,
createPreviewWidget is working :), now I will adjust the preview in a QWidget