Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.3.2
-
None
-
Windows 11, Visual Studio 2022
Description
This little program crashes in the QPainter constructor:
QPrinter printer; QPrintDialog pd(&printer); if (pd.exec() == QDialog::Accepted) { QPainter painter(&printer); //crash! painter.drawLine(10, 10, 20, 20); }
If I configure the printer to save a PDF file (QPrinter::setOutputFileName), it works.
I have tested selecting the the "Microsof Print to PDF" or the "Microsoft XPS document Writer" printers in the native print dialog. The program crashes after selecting the save file path. Actually I can't test it with a "real" printer.