Hi,
I am trying print a Qtable. Using the grabwidget way seems inadequate as the image is very small and If the table has scrollbars then the image includes the scrollbars and shows only the visible table area. Looks like it works similar to printscreen.
Is there any other way to print a QTable?
Any Suggestions will be appreciated.
current code:
aprinter.setFullPage( TRUE );
if(aprinter.setup(this)
{
QTable* thetable = theApp->theTable;
p.begin(&aprinter);
p.drawPixmap(0,0,pixmap);
p.end();
}
QPrinter aprinter( QPrinter::HighResolution );
aprinter.setFullPage( TRUE );
if(aprinter.setup(this)
{
QTable* thetable = theApp->theTable;
QPixmap pixmap = QPixmap::grabWidget(thetable);
QPainter p;
p.begin(&aprinter);
p.drawPixmap(0,0,pixmap);
p.end();
}
To copy to clipboard, switch view to plain text mode
Thanks,
Bookmarks