[Qt-interest] How to print out widgets?

M. Bashir Al-Noimi admin at mbnoimi.net
Tue Jun 15 07:00:28 CEST 2010


Do you mean I've to change printer settings to 72 dpi or I've to change 
my code?

PS
I tried to change printer settings from 600 dpi to 72 but it didn't fix 
the issue!

On 15/06/2010 05:41 ?, Jason H wrote:
> 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:
>
>
> 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
>    
>


-- 
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/e4efb342/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admin.vcf
Type: text/x-vcard
Size: 403 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100615/e4efb342/attachment.vcf 


More information about the Qt-interest-old mailing list