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

QPrinter default page size for custom page size seems not to work

    XMLWordPrintable

Details

    • Windows

    Description

      If a printer has a custom paper size (for example 40x40) set as default page size, using QPrinter for that printer returns 'A4' (QPagedPaintDevice::A4) as a default page size.

      Using a standard default page size, for example 'Letter' works just fine, so it seems like this bug is related to custom page sizes.

      Setting the custom page size for the QPrinter works as expected, but default page size should not return 'A4' page size when a custom page size is set as default for the printer. It should return QPagedPaintDevice::Custom

      This has been tested and reproduced with Qt 5.9.7 and Qt 5.12. This seems to work as expected in Qt 4.x

      I have attached an example project to demonstrate this issue. In order to test it, you need to setup a custom printer driver which allows to use custom paper sizes.

      Attachments

        1. PageSizeTest.zip
          9.57 MB
        2. qtbug73249_log.txt
          0.7 kB
        3. qtbug73249.zip
          2 kB

        Issue Links

          Activity

            People

              anrocha André De La Rocha (Inactive)
              pekarjal Pekka Karjalainen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: