Hi All,

I'm trying to print in linux(Ubuntu 9.10) using this code:

Qt Code:
  1. QTextEdit tedprint;
  2. QPrinter printer;
  3. QPrinterInfo printerInfo = QPrinterInfo::defaultPrinter();
  4. printer.setPrinterName(printerInfo.printerName());
  5.  
  6. tedprint.setText("Test Print Test Print Test Print");
  7. tedprint.setDocumentTitle ("Printing Sample");
  8. tedprint.print(&printer);
To copy to clipboard, switch view to plain text mode 

but it failed to print. I get the warning:

Qt Code:
  1. lp: Unsupported format 'application/postscript'!
To copy to clipboard, switch view to plain text mode 

but when i try to print in terminal, lp print.txt, it prints well. How can I fix this? thanks