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

QPageSetupDialog swaps top and right margins -- easy fix

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.3.1
    • 5.3.0
    • GUI: Printing
    • None
    • Windows

    Description

      The right and top margins get swapped.

      If you enter the following margins in a QPageSetupDialog window:

         Left: 1
         Top: 2
         Right: 3
         Bottom: 4

      then get the margins back from the dialog, you get these:

         Left: 1
         Top: 3
         Right: 2
         Bottom: 4

      It looks like only two lines of Qt source code need to be changed. In QPageSetupDialog_win.cpp

      Currently lines 140 and 141:
      d->printer->setPageMargins(QMarginsF(psd.rtMargin.left / multiplier, psd.rtMargin.right / multiplier,
      psd.rtMargin.top / multiplier, psd.rtMargin.bottom / multiplier),

      Change to:
      d->printer->setPageMargins(QMarginsF(psd.rtMargin.left / multiplier, psd.rtMargin.top / multiplier,
      psd.rtMargin.right / multiplier, psd.rtMargin.bottom / multiplier),

      Attachments

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

        Activity

          People

            johnlayt John Layt
            superfun Mike Kuta
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes