Issue with using QGraphicsScene::render() with QLinearGradient
-
I have a QGraphicsScene with various objects representing a table plan. When someone prints I use QGraphicsScene::render() on a QPrinter object to do the printout. This has worked fine in Qt 5 for years. But I have run into an issue with Qt 6 on Windows.
When I QGraphicsScene::render() this:
I get this:
The gradient just stops beyond a certain x value.
It happens if I print to a real printer or a PDF virtual printer. Customers have reported the issue a well, so it isn't just my computer or printer.
If I change the QLinearGradient on the seats or tables to a flat colour, the problem goes away.
The issue occurs with Qt 6.5.5 LTS on Windows 10. Qt 6.5.5 LTS on macOS seems to work ok. The problem does not occur with Qt 5.
Has anyone else seen this? I wanted to check before I spend ages writing a standalone program to reproduce the issue.