Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
No text zooming for printing
AlexxanderX last edited by
I need to print a webpage but the painter/webpage doesn't zoom properly: only the tables lines are zoomed and the text remain small.
Here is the code:
@void InmatriculareWindow::preparePrinter(QWebPage &page, QSize size)
page.setViewportSize(size); double xscale = m_printer->pageRect().width()/double(size.width()); double yscale = m_printer->pageRect().height()/double(size.height()); double scale = qMin(xscale, yscale); painter.scale(scale, scale); page.mainFrame()->render(&painter);
And here is the ouput: