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

QPageSetupDialog swaps top and right margins -- easy fix

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.3.0
    • Fix Version/s: 5.3.1
    • Component/s: GUI: Printing
    • Labels:
      None
    • Environment:
      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

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes