0
votes

We are able to export/print preview on some machine using QPrinter command. But some we can not see the preview.

In the debug view getting below errors:

QPrinter::Invalid metric command QWidget::render: cannot render with inactive painter

printsupport dll is copied to the appropriate loacation i.e. AppPath\printsupport\windowsprintersupport.dll

someone have any idea.Thanks.

1
did that use to work for you before and now it stopped? please provide the code you are using - Mike
It is working on some system but not on others. - Question and Answer

1 Answers

0
votes

Try

painter.scale(1.01, 1.01);

or

painter.scale(0.99, 0.99);

I do not know why but it works with my app.I do not really need to scale(), but without it, the same error occurs. PS: QPainter::begin: Paint device returned engine == 0, type: 2 Here is another example of this error.