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

QPrinterInfo::supportedResolutions() return wrong values

    XMLWordPrintable

Details

    • 591bce8f6877ffb8e4ab81330ec077231eb2aab7

    Description

      Supported resolution list does not contain right values, count in the list is right but it contains duplicates instead of all the resolutions.

      See the attached pictures.

      #include "mainwindow.h"
      #include <QApplication>
      #include <QPrinter>
      #include <QPrinterInfo>
      #include <QDebug>
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);    
          QList<QPrinterInfo> printers = QPrinterInfo::availablePrinters();
          for(int i = 0; i < printers.size(); i++)
          {
              QList<int> infoDpi = printers.at(i).supportedResolutions();
              for(int j = 0; j < infoDpi.count(); j++){
                  qDebug() << printers.at(i).printerName() << " " << infoDpi.at(j);
              }
          }
          return a.exec();
      }
      

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            anylitok Antti Yli-Tokola (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes