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

setPageMargins changes the pageRect incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 4.8.0
    • GUI: Printing
    • None
    • Ubuntu 12.04 + LXDE
      g++ 4.6.3
      Printer: Dymo LabelWriter 450 Turbo
      Papersize: 32mm x 57mm

    Description

      After setting the pageMargins to the same values, the pageRect is changed. paperRect stays the same, but is lower than pageRect.

      QPrintDialog *pDlg = new QPrintDialog( this );
      if ( pDlg->exec() == QDialog::Accepted )

      { QPrinter *p = pDlg->printer(); qreal top,left,right,bottom; qDebug()<<p->pageRect()<<p->paperRect(); //QRect(4,5 191x99) QRect(0,0 198x110) p->getPageMargins( &left, &top, &right, &bottom, QPrinter::Point); p->setPageMargins( left, top, right, bottom, QPrinter::Point); qDebug()<<p->pageRect()<<p->paperRect(); //QRect(12,12 703x1005) QRect(0,0 198x110) }

      Output:
      QRect(4,5 191x99)
      QRect(12,12 703x1005)

      The same happens with QPrinter::Point.

      Attachments

        Issue Links

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

          Activity

            People

              johnlayt John Layt
              f18169a Gabriel Ghenzi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes