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

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

    XMLWordPrintable

Details

    • 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

            vhilshei Volker Hilsheimer
            nagrohn Nahomi Gröhn (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes