In a case where a QTableView is displayed inside a QGraphicsView, calling QGraphicsView::render with an attempt to paint to a QPdfWriter would result in the QTableView not being correctly drawn. The actual body of the table is mostly okay but the header texts would overlap each other making some of the text unreadable or appear entirely missing.
In contrast, painting to a QImage or a QPrinter works without such issues.
Steps to reproduce:
- Run the attached project
- Click the button
- Check the build directory for the output pdf