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

QPrinter::setPageMargins doesnt set the correct values, Regression since Qt4

    XMLWordPrintable

Details

    Description

      Use the example
      Qt4: qt/demos/textedit/
      Qt5: qt5/qtbase/examples/widgets/richtext/textedit

      Alter the function,

      void TextEdit::filePrintPreview()
      {
      #ifndef QT_NO_PRINTER
          QPrinter printer(QPrinter::HighResolution);
      // Try 1
          printer.setPageMargins(0,0,0,0,QPrinter::Inch);
      // Try 2
          printer.setFullPage(true);
      ....
      }
      

      Issue 1:
      Run the example, Click on File > Print Preview
      See that the behaviour is same for both Try 1 and 2 in Qt5
      wheras different in Qt4.

      Expected as in Qt4.

      Issue 2:
      Also Run the example, print native and check the outputs.
      Expected as in Qt4

      Attachments

        1. printmargins.diff
          3 kB
          Indrajit Tapadar
        2. qtbug32987.zip
          5 kB
          Friedemann Kleint
        3. qtbug32987a.zip
          3 kB
          Kurt Keller

        Issue Links

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

          Activity

            People

              qtcomsupport Qt Support
              tapadar Indrajit Tapadar (Inactive)
              Votes:
              10 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes