Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.6, 6.2.0, 6.3
-
macOS 11.0, XCode 12
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.