impeteperry
4th May 2006, 12:41
In QT3 the code
QPrinter myprinter; // = new QPrinter();
myprinter.setPageSize( QPrinter::Letter );
myprinter.setOrientation( QPrinter::Portrait );
myprinter.setColorMode( QPrinter::Color );
myprinter.setFullPage ( true );
ret = myprinter.setup();
if( ret == true )
{
QPainter p( &myprinter );gave the user of a program the oppurtunity to change the default perameters for a print out. Qt4 says to use "QPrintDialog printDialog" for this.
The "Detailed Description" for this function says
Typically, QPrintDialog objects are constructed with a QPrinter object, and executed using the exec() function.
QPrintDialog printDialog(printer, parent);
if (printDialog.exec() == QDialog::Accepted) {
// print ...
}
I am a bit of a newbie in deciphering Qt4's style of documentation and with no print examples that I can find I need help.
Thanks
QPrinter myprinter; // = new QPrinter();
myprinter.setPageSize( QPrinter::Letter );
myprinter.setOrientation( QPrinter::Portrait );
myprinter.setColorMode( QPrinter::Color );
myprinter.setFullPage ( true );
ret = myprinter.setup();
if( ret == true )
{
QPainter p( &myprinter );gave the user of a program the oppurtunity to change the default perameters for a print out. Qt4 says to use "QPrintDialog printDialog" for this.
The "Detailed Description" for this function says
Typically, QPrintDialog objects are constructed with a QPrinter object, and executed using the exec() function.
QPrintDialog printDialog(printer, parent);
if (printDialog.exec() == QDialog::Accepted) {
// print ...
}
I am a bit of a newbie in deciphering Qt4's style of documentation and with no print examples that I can find I need help.
Thanks