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

Painting using Qt::color1 on Format_MonoLSB QImage doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.2
    • 5.6.0, 5.6.1
    • GUI: Painting
    • None
    • Windows. Maybe others.

    Description

      I am unable to draw text on a Mono_LSB QImage using QPainter.

      I fill the QImage with color0 using QImage::fill(Qt::color0); then try to use a QPainter to draw text with color Qt::color1.

      The text doesn't show up.

      This used to work in versions prior to Qt 5.6.

      If I change the code to use Qt::white for the text, it shows up OK.

      See attached mono.zip for a reproducible test case.

      Attachments

        1. mono.zip
          1 kB
        2. mono2.zip
          1 kB
        3. qtbug54827.jpg
          qtbug54827.jpg
          47 kB
        4. qtbug54827.zip
          2 kB
        For Gerrit Dashboard: QTBUG-54827
        # Subject Branch Project Status CR V

        Activity

          People

            vgt Eirik Aavitsland
            mkrautz Mikkel Krautz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes