<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Help with printing Qpixmap]]></title><description><![CDATA[<p dir="auto">i want to print out Qtableview in QPrintPreviewDialog and this is my code .<br />
but in QPrintPreviewDialog it show very small<br />
"picture of my QPrintPreviewDialog ":<a href="http://www.xum.ir/images/2014/05/22/print.png" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.xum.ir/images/2014/05/22/print.png</a><br />
any body can help me?<br />
@<br />
void Report::filePrintPreview(){<br />
#ifndef QT_NO_PRINTER<br />
QPrinter printer(QPrinter::HighResolution);<br />
QPrintPreviewDialog preview(&amp;printer, this);<br />
preview.setWindowFlags ( Qt::Window );<br />
connect(&amp;preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter *)));<br />
preview.exec();<br />
#endif<br />
}</p>
<p dir="auto">void Report::printPreview(QPrinter *printer){<br />
QPixmap pixmap(ui-&gt;tableView-&gt;size());<br />
ui-&gt;tableView-&gt;render(&amp;pixmap);<br />
QPainter painter;<br />
painter.begin(printer);//p is my QPrinter<br />
printer-&gt;paintEngine()-&gt;drawPixmap(QRectF(0, 0, pixmap.width(), pixmap.height()), pixmap, QRectF(0, 0,pixmap.width(), pixmap.height()));<br />
painter.end();<br />
}<br />
@</p>
]]></description><link>https://forum.qt.io/topic/41701/help-with-printing-qpixmap</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 10:55:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/41701.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 May 2014 07:13:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help with printing Qpixmap on Sun, 25 May 2014 08:59:25 GMT]]></title><description><![CDATA[<p dir="auto">No one could answer my question?</p>
]]></description><link>https://forum.qt.io/post/229750</link><guid isPermaLink="true">https://forum.qt.io/post/229750</guid><dc:creator><![CDATA[buddha]]></dc:creator><pubDate>Sun, 25 May 2014 08:59:25 GMT</pubDate></item><item><title><![CDATA[Reply to Help with printing Qpixmap on Sun, 25 May 2014 08:58:21 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="SGaist" date="1400794409"]Hi,</p>
<p dir="auto">Have a look "here":<a href="http://qt-project.org/doc/qt-5/qtprintsupport-index.html#printing-widgets%5B/quote%5D" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5/qtprintsupport-index.html#printing-widgets[/quote]</a></p>
<p dir="auto">I've read this before,<br />
If possible, read and then answer a question.</p>
]]></description><link>https://forum.qt.io/post/229749</link><guid isPermaLink="true">https://forum.qt.io/post/229749</guid><dc:creator><![CDATA[buddha]]></dc:creator><pubDate>Sun, 25 May 2014 08:58:21 GMT</pubDate></item><item><title><![CDATA[Reply to Help with printing Qpixmap on Thu, 22 May 2014 21:33:29 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Have a look "here":<a href="http://qt-project.org/doc/qt-5/qtprintsupport-index.html#printing-widgets" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/doc/qt-5/qtprintsupport-index.html#printing-widgets</a></p>
]]></description><link>https://forum.qt.io/post/229534</link><guid isPermaLink="true">https://forum.qt.io/post/229534</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 22 May 2014 21:33:29 GMT</pubDate></item><item><title><![CDATA[Reply to Help with printing Qpixmap on Thu, 22 May 2014 11:18:31 GMT]]></title><description><![CDATA[<p dir="auto">any body can't help me?<br />
pleeeeeas</p>
]]></description><link>https://forum.qt.io/post/229453</link><guid isPermaLink="true">https://forum.qt.io/post/229453</guid><dc:creator><![CDATA[buddha]]></dc:creator><pubDate>Thu, 22 May 2014 11:18:31 GMT</pubDate></item></channel></rss>