QPrintDialog Error on QT Windows Environment
-
Hi All,
We have wuery regarding QprintDialog.
Following code we are using for QPrintDialog.@
QPrinter *printer = new QPrinter;
int total = 0;
printer->setPageSize(QPrinter::A5);
printer->setOrientation(QPrinter::Landscape);
printer->setOutputFileName("./print.pdf");
QPrintDialog *printDialog = new QPrintDialog(printer, this);if (printDialog->exec() == QDialog::Accepted)
{
QPainter p(printer);
.....
}
@When the above code execute then after printDialog->exec() statement it gives following error.
@
QPrintDialog: Cannot be used on non-native printers
QPrintDialog: Cannot be used on non-native printers
@Interesting is that whne i execute same code in Linux then it execute successfully and also print the page we have given
But in windows environment it gives above error.
So what is the issue ?Regards,
NeelEDIT: please use @-tags for code highlighting, Gerolf