How to print in a native format using Qprinter
Dear Friends,
I am trying to print text using Qprinter, it gives error like this,
lpr: Unsupported format 'application/postscript'!
then i tried with setoutputformat() member, still gives same error can any body help me please,
code is
Code:
QTextEdit *editor
= static_cast<QTextEdit
*>
(letters
->currentWidget
());
//! [18]
printer.
setOutputFormat(QPrinter::NativeFormat);
printer.setPrintProgram("lpr");
dialog->setWindowTitle(tr("Print Document"));
dialog->
if (editor->textCursor().hasSelection())
if (dialog
->exec
() != QDialog::Accepted) return;
//! [18]
editor->print(&printer);
Re: How to print in a native format using Qprinter
The native format on your system probably postscript.
Do you have the necessary postscript libraries installed?