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

Printing fails when objects are painted with non-solid fill BrushStyle

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.6, 6.2.0, 6.3
    • Fix Version/s: None
    • Component/s: GUI: Printing
    • Environment:
      macOS 11.0, XCode 12
    • Platform/s:
      macOS

      Description

      When printing an object with a non-solid fill brush (e.g. Qt::HorPattern), the print operation fails. The print job is queued up but no print output is generated.
      Printing to a PDF works fine.

      The attached sample project is based on https://doc-snapshots.qt.io/qt6-dev/qtwidgets-widgets-scribble-example.html. The modification is as follows under paintEvent and print()

      
       //    painter.drawImage(dirtyRect, image, dirtyRect);     Disabled
          painter.setBrush(QBrush(0xff0000ff, Qt::HorPattern));   // Added
          painter.drawRect(200,200,200,200);                               // Added 
      
      

      The printing works fine when e.g. Qt::SolidPattern is used.

        Attachments

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

          Activity

            People

            Assignee:
            mikolaj.boc Mikołaj Boc
            Reporter:
            nagrohn Nahomi Gröhn
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes