Congratulations to our 2022 Qt Champions!

QWebEnginePage's print preview (PrintPreviewDialog) is fuzzy

  • I'm working on a project using QWebEnginePage to print web page.

    When showing print preview by PrintPreviewDialog,the page content is fuzzy (zoom 100%),while if we use QTextEdit instead of QWebEnginePage to render the page content, the page preview in PrintPreviewDialog is clear, Could you give any suggestions to this issue.

  • Here is my code:

    paintRequested signal is connected to paint function:

    connect(&previewDialog, &QPrintPreviewDialog::paintRequested, this, &PrintHandler::paint);

    paint function

    void PrintHandler::paint(QPrinter *printer)
        QEventLoop loop;
        bool result;
        auto cb = [&](bool success) {
            result = success;
        };>print(printer, std::move(cb)); // render the page content
        if (!result) {

  • Meet the same issue under Ubuntu 20.04 with Qt 5.15.2

    If we do not use PrintPreviewDialog, but print QWebEnginePage as PDF document directly, the resolution is correct as what we set in QPrinter.


  • @HiMa
    I note that the bug ref you give was fixed as of 5.14.0 RC1, yet you say you see this in 5.15.2? I don't know how that relates to the OP's version. Are you saying the issue has not been resolved after all?

  • this is still problem in qt5.15.2 .
    has not been fixed completely.

Log in to reply