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

Regression , QPrinter::pageRect() returns negative value using Qt5.2 on Windows

XMLWordPrintable

      Run the below code,

      #include <QPrinter>
      #include <QDebug>
      #include <QPrintDialog>
      #include <QApplication>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QPrinter printer;
          QPrintDialog printDialog(&printer, NULL);
          if (printDialog.exec() == QDialog::Accepted)
          {
              QRect pageRect = printer.pageRect();
              qDebug() << pageRect;
          }
      
          return 0;
      }
      

      The pageRect value (0,0,-1,-1)
      It showed correct values in Qt5.1

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

            johnlayt John Layt
            tapadar Indrajit Tapadar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes