Printing Screenshot -> poor quality
Hello,
i am trying to print a screenshot, but the print has a poor quality. is there a way to scale and print an image in high quality.
Code:
void Window::printScreenshot()
{
Q_ASSERT(imageLabel->pixmap());
if (dialog.exec()) {
QRect rect
= painter.
viewport();
QSize size
= imageLabel
->pixmap
()->size
();
size.scale(rect.size(), Qt::KeepAspectRatio);
imageLabel->resize(size.width(), size.height());
painter.setViewport(rect.x(), rect.y(), size.width(), size.height());
painter.setWindow(imageLabel->pixmap()->rect());
painter.drawPixmap(0, 0, *imageLabel->pixmap());
}
}
Kind regards
Marc Schubert
PS: excuse my english
Re: Printing Screenshot -> poor quality
See QPrinter::setResolution.
Uwe
Re: Printing Screenshot -> poor quality