Originally Posted by
impeteperry
QPrintDialog printDialog(printer, parent);
if (printDialog.exec() == QDialog::Accepted) {
// print ...
}
It's a Qt4 equivalent of:
ret = myprinter.setup();
if( ret == true )
{
// print ...
}
ret = myprinter.setup();
if( ret == true )
{
// print ...
}
To copy to clipboard, switch view to plain text mode
The "print ..." part didn't change much in Qt4, i.e. it's something like this:
p.begin( &myprinter );
p.setPen( ... );
p.drawLine( 10, 10, 100, 100 );
...
p.end();
QPainter p;
p.begin( &myprinter );
p.setPen( ... );
p.drawLine( 10, 10, 100, 100 );
...
p.end();
To copy to clipboard, switch view to plain text mode
Bookmarks