QPrinter printer;
QPainter painter;
if (! painter.begin(&printer)) { // failed to open file
qWarning("failed to open file, is it writable?");
return 0;
}
painter.drawText(10, 10, "Testing the automaization of this printer");
QString str="Pdf is ready to print";
painter.drawText(40,80,str);
painter.end();
Whenever i run this snippet on the PC it works fine like it should but whenever we deploy in the IMX6 board it gives an error QPainter::begin(): returned false error