Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-93303

Proposal for a system and printer independent painter object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15
    • GUI: Printing
    • None
    • Linux, Windows, OSX
    • Linux/X11, macOS, Windows

    Description

      Hi everyone,

      can we default the QPrinter to a resolution of 300 DPI? I am mainly programing on Linux and was wondering why the QPrintDialog was not able to print the same painter object on Windows.

      It take me a while to realize that Windows default printer is set to 300 DPI and the Linux default printer is set to 1200 DPI.

      After using:

      QPrinter printer(QPrinter::HighResolution);
      printer.setResolution(300);

      I am able to organize one painter object for both systems.

      I was also able to reproduce the correct textsize if I use setFont right before drawText:

      painter.setFont(QFont("Arial", 13,QFont::Bold));
      painter.drawText(textPos,"Printertest");

      I also tested QPrintPreviewDialog on Windows with 1200 DPI.
      While the print preview dialog displays the full page correctly it will also print a wrong result when using 1200 DPI on Windows.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johnlayt John Layt
            engys Engys Plitchwood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes