[Qt-interest] How to print out widgets?
Jason H
scorp1us at yahoo.com
Tue Jun 15 05:41:36 CEST 2010
Be sure to account for DPI issues.... your printer wil be ~300, your display is 72, which might explain the issue...
________________________________
From: M. Bashir Al-Noimi <admin at mbnoimi.net>
To: qt-interest at trolltech.com
Sent: Tue, June 15, 2010 12:15:25 AM
Subject: [Qt-interest] How to print out widgets?
Hi folks,
I tried to print out
QTableWidget as shown below:
QPrinterprinter;
printer.setPageSize(QPrinter::A4);
QPrintDialog print(&printer , this);
QPainter painter(&printer);
if(print.exec()== QPrintDialog::Accepted)
{
ui->tableWidget->setFixedWidth(250);
ui->tableWidget->render(&painter, QPoint(100, 100));
}
but it didn't print out anything and gave me the following error
message instead:
QWin32PrintEngine::drawPixmap,
StretchBlt failed (Not enough storage is available to process this
command.)
How I can fix this
issue?
--
Best Regards
Muhammad Bashir Al-Noimi
My Blog: http://mbnoimi.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100614/c5f949cb/attachment.html
More information about the Qt-interest-old
mailing list