wbt_ph
20th October 2007, 08:21
Hello.
Painting on printer landscape orientation seems to behave oddly on linux (fedora 7).
The following is my code snippet:
QPrinter printer;
printer.setOrientation ( QPrinter::Landscape );
printer.setPageSize ( QPrinter::Legal );
printer.setFullPage(true);
QPainter paintPrinter;
paintPrinter.begin ( &printer );
paintPrinter.drawText ( 0, 0, 100, 25, Qt::AlignLeft, "Hello World" );
paintPrinter.end();
The program prints properly on windows.
However on linux (fedora 7), it does not print anything at all - just ejects paper. If I use longer text sometimes it prints (correct orientation) BUT in the middle of the paper - horizontally and vertically (the margins seems to be incorrect).
Any help?
Thank you.
Wilbert
Painting on printer landscape orientation seems to behave oddly on linux (fedora 7).
The following is my code snippet:
QPrinter printer;
printer.setOrientation ( QPrinter::Landscape );
printer.setPageSize ( QPrinter::Legal );
printer.setFullPage(true);
QPainter paintPrinter;
paintPrinter.begin ( &printer );
paintPrinter.drawText ( 0, 0, 100, 25, Qt::AlignLeft, "Hello World" );
paintPrinter.end();
The program prints properly on windows.
However on linux (fedora 7), it does not print anything at all - just ejects paper. If I use longer text sometimes it prints (correct orientation) BUT in the middle of the paper - horizontally and vertically (the margins seems to be incorrect).
Any help?
Thank you.
Wilbert