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

Setting page size QPdfWriter does not have any effect

    XMLWordPrintable

Details

    • a6161563e65b398b0e16ed35e97c8828a0ec0526

    Description

      #include <QtWidgets>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QFile file("C:/test2.pdf");
          file.open(QIODevice::ReadWrite);
          QPdfWriter pdf(&file);
          pdf.setPageSizeMM(QSize(100,50));
      
          QPainter painter(&pdf);
          painter.fillRect(100,100,200,200,Qt::red);
          painter.end();
      
          file.close();
      
          return 0;
      }
      

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes