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

Cannot preselect a custom paper format with QPrintDialog on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.8.x
    • 4.6.3
    • GUI: Printing
    • None

      There is no code in the Qt source tree to pre-populate the Windows DEVMODE structure for custom sizes.

      In order to set a custom size the dmPaperSize field has to be set to DMPAPER_USER and the paper dimensions have to be specified in dmPaperWidth and dmPaperLength.

      A grep on the source tree shows that these members are never used or accessed.

      The attached program shows a print dialog with a preset custom format of 12cm x 15cm. The program shows the dialog using both Qt and Windows native calls. Please note that for testing a printer driver should be used that supports custom formats.

        1. print_dialog.cpp
          1 kB
        2. print_dialog.pro
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            johnlayt John Layt
            tc@4js.com Tristan Chabredier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes