Apparently, what I state in the title is not yet possible:
int pw = printer->pageRect().width();
int ph =printer->pageRect().height();
p.setViewport(printer->pageRect());
p.begin(printer);
m_document->setPageSize(printer->pageRect().size());
m_document->drawContents(&p);
printer->newPage();
QRect rec
(-10,
0.4*ph,pw
-10,
0.6*ph
);
if (solarDiagram)
solarDiagram->print(&p,rec,filter);
QPainter p;
int pw = printer->pageRect().width();
int ph =printer->pageRect().height();
p.setViewport(printer->pageRect());
printer->setPageSize(QPrinter::A4);
p.begin(printer);
m_document->setPageSize(printer->pageRect().size());
m_document->drawContents(&p);
printer->newPage();
QRect rec(-10,0.4*ph,pw-10,0.6*ph);
if (solarDiagram)
solarDiagram->print(&p,rec,filter);
To copy to clipboard, switch view to plain text mode
m_document has just a simple Html String.
The qwtPlot goes to the second page and it's visible. But the text on the first page is ultra-small. It seems that the painter is painting on a wrong rectangle,isnt'it?
Bookmarks