LimeReport Forum
General Category | Основное => Discussion | Обсуждение => Topic started by: Proton Phoenix on September 28, 2022, 10:52:10 pm
-
Hi ~~~
i am trying to create an embedded widget but it doesn't work at all
LimeReport::ReportEngine *report=new LimeReport::ReportEngine(this);
report->loadFromFile(QDir::currentPath().append("/release/report/test1.lrxml"));
report->createPreviewWidget(ui->widget);
it's shows only this on QDebug output but nothing in QWidget
m_pagesize= LimeReport::PageItemDesignIntf::A4
initpagesizewidth= 2000
initpagesizeheight= 2870
m_pagesize= LimeReport::PageItemDesignIntf::A4
is there any solution?
-
try this
LimeReport::ReportEngine *report=new LimeReport::ReportEngine(this);
report->loadFromFile(QDir::currentPath().append("/release/report/test1.lrxml"));
QWidget *previewWidget=report->createPreviewWidget(ui->widget);
qDebug()<<previewWidget->isVisible()<<previewWidget->size()<<<previewWidget->pos();
-
Thank you so much bro <3 it works
-
Have u forgot to rize widget->show(); ?
Or widget->resize() & widget->move() helps?
-
Have u forgot to rize widget->show(); ?
Or widget->resize() & widget->move() helps?
i did it like
previewWidget->setMaxmiumSize(ui->widget->size());
previewWidget->show();