[Qt-interest] How to print out widgets?
M. Bashir Al-Noimi
admin at mbnoimi.net
Tue Jun 15 06:15:25 CEST 2010
Hi folks,
I tried to print out QTableWidget as shown below:
QPrinter printer;
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/20100615/b8ed4530/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admin.vcf
Type: text/x-vcard
Size: 414 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100615/b8ed4530/attachment.vcf
More information about the Qt-interest-old
mailing list