printer.setOutputFileName("print.ps");
painter.begin(&printer);
painter.drawText(painter.pageRect(), YourQStringHere);
painter.end();
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFileName("print.ps");
QPainter painter;
painter.begin(&printer);
painter.drawText(painter.pageRect(), YourQStringHere);
painter.end();
To copy to clipboard, switch view to plain text mode
Please don't send me any links to trolltech documentation. I have read it and I have found it to be confusing (at least to me).
Then you should probably learn C++ first since the documentations is the best out there for a c++ framework. And if you don't understand that reference you lacking to much object orientated knowledge to combine the documentations of QPrinter and QPainter...
Bookmarks