Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: previewReport making my main GUI freeze in QML  (Read 1293 times)

omaro

  • Newbie
  • *
  • Posts: 4
    • View Profile
previewReport making my main GUI freeze in QML
« 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;
}
« Last Edit: June 01, 2020, 02:23:35 AM by omaro »

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: previewReport making my main GUI freeze in QML
« Reply #1 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

omaro

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: previewReport making my main GUI freeze in QML
« Reply #2 on: June 01, 2020, 02:22:08 AM »
Thank you Alex,
createPreviewWidget is working :), now I will adjust the preview in a QWidget