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

QPrinter: incorrect color count returned / color printing not working correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.7.2
    • 4.6.0, 4.6.1, 4.6.2, 4.6.3
    • GUI: Painting
    • None
    • Windows 7
    • 6ecb1be99ff951f35d7b391d6ffb033da696ca74

      When printing to a color printer, lines are drawn using black and white (color count 2). PDF output is rendered correctly. Color printers and Microsoft virtual printing (XPS format) show the line item as black and white.

      This code reproduces the problem:

      QPrinter printer;

      QPainter painter(&printer);

      painter.setPen(Qt::magenta);
      painter.drawLine(79 ,112 ,711, 160);

      QBrush brush(Qt::magenta);
      painter.setBrush(brush);
      painter.drawRect(100,100,100,100);

      The output will consist of a magenta rectangle, with a sloping line that's drawn in black and white.

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

            kjernase Trond Kjernåsen (Inactive)
            cattell Matthew Cattell (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes