<?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[QPrinterDialog don&#x27;t give the good paper size]]></title><description><![CDATA[<p dir="auto">hello everybody,</p>
<p dir="auto">I have a big problem ;)!!Yan can maybe help me.</p>
<p dir="auto">I have two printer<br />
-BROTHER 21cm<em>29.7cm<br />
-Dymo(sticker printer) :3,2cm</em>5,7cm</p>
<p dir="auto">when i call QPrintDialog and select the printer I want.The printer nam of the current printer changed but not the pageRect ,pageSize...and continue to give me the size of default printer.</p>
<p dir="auto">Exemple</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/void">@<bdi>void</bdi></a> MainWindow::openprinterconfig()<br />
{</p>
<pre><code>   QPrintDialog *dialog = new QPrintDialog(myprinter);

   dialog-&gt;exec&amp;#40;&amp;#41; ;
   qDebug("%f", myprinter-&gt;paperRect(QPrinter::Millimeter).height());
   qDebug("%f", myprinter-&gt;paperRect(QPrinter::Millimeter).width());
   qDebug(myprinter-&gt;printerName().toLocal8Bit());
</code></pre>
<p dir="auto">}@</p>
<p dir="auto">case 1:Dymo is default printer and i try to select BROTHER printer<br />
31.750000<br />
57.150000<br />
Brother HL-2140</p>
<p dir="auto">case 2:BROTHER is default printer and i try to select Dymo printer<br />
297.000000<br />
210.000000<br />
DYMO LabelWriter 450</p>
<p dir="auto">If i try to print the selected printer in Qdialog work but I have to get the papersize in my application.</p>
<p dir="auto">Couold you help me Please?</p>
]]></description><link>https://forum.qt.io/topic/46668/qprinterdialog-don-t-give-the-good-paper-size</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Apr 2026 05:00:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/46668.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Oct 2014 16:24:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QPrinterDialog don&#x27;t give the good paper size on Sun, 05 Oct 2014 08:33:34 GMT]]></title><description><![CDATA[<p dir="auto">Unfortunately the problem continue,</p>
<p dir="auto">with this code<br />
QPrintDialog *dialog = new QPrintDialog(this);<br />
@        if(dialog-&gt;exec() ==QDialog::Accepted)</p>
<pre><code>   {
        QPrinter* printer3 = dialog-&gt;printer()  ;
        qDebug(dialog-&gt;printer()-&gt;printerName().toLocal8Bit());
        printer3-&gt;setFullPage(true);
        qDebug("%f", printer3-&gt;pageRect(QPrinter::Millimeter).height());
        qDebug("%f", printer3-&gt;pageRect(QPrinter::Millimeter).width());
    }@
</code></pre>
<p dir="auto">QT return:</p>
<p dir="auto">if the BROTHER is the default printer:<br />
DYMO LabelWriter 450<br />
297.000000<br />
210.000000</p>
<p dir="auto">if the DYMO is the default printer:<br />
DYMO LabelWriter 450<br />
31.750000<br />
57.150000</p>
]]></description><link>https://forum.qt.io/post/246277</link><guid isPermaLink="true">https://forum.qt.io/post/246277</guid><dc:creator><![CDATA[profecie]]></dc:creator><pubDate>Sun, 05 Oct 2014 08:33:34 GMT</pubDate></item><item><title><![CDATA[Reply to QPrinterDialog don&#x27;t give the good paper size on Sat, 04 Oct 2014 22:03:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi, just guessing but try calling myprinter-&gt;setFullPage(true); just before the paperRect() calls.</p>
]]></description><link>https://forum.qt.io/post/246255</link><guid isPermaLink="true">https://forum.qt.io/post/246255</guid><dc:creator><![CDATA[hskoglund]]></dc:creator><pubDate>Sat, 04 Oct 2014 22:03:53 GMT</pubDate></item><item><title><![CDATA[Reply to QPrinterDialog don&#x27;t give the good paper size on Sat, 04 Oct 2014 20:52:50 GMT]]></title><description><![CDATA[<p dir="auto">and thanks for your answers</p>
]]></description><link>https://forum.qt.io/post/246247</link><guid isPermaLink="true">https://forum.qt.io/post/246247</guid><dc:creator><![CDATA[profecie]]></dc:creator><pubDate>Sat, 04 Oct 2014 20:52:50 GMT</pubDate></item><item><title><![CDATA[Reply to QPrinterDialog don&#x27;t give the good paper size on Sat, 04 Oct 2014 20:52:01 GMT]]></title><description><![CDATA[<p dir="auto">I use qt on Windows 7 64 bits with QT Crator 3.2.0 and QT 5.3.1<br />
I use the compiler mingw 4.82</p>
]]></description><link>https://forum.qt.io/post/246245</link><guid isPermaLink="true">https://forum.qt.io/post/246245</guid><dc:creator><![CDATA[profecie]]></dc:creator><pubDate>Sat, 04 Oct 2014 20:52:01 GMT</pubDate></item><item><title><![CDATA[Reply to QPrinterDialog don&#x27;t give the good paper size on Sat, 04 Oct 2014 20:18:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Pretty strange indeed. What version of Qt/OS are you running ? What compiler are you using ?</p>
]]></description><link>https://forum.qt.io/post/246241</link><guid isPermaLink="true">https://forum.qt.io/post/246241</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 04 Oct 2014 20:18:24 GMT</pubDate></item></channel></rss>