<?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[PySide2 cannot display image]]></title><description><![CDATA[<p dir="auto">I also asked this question at <a href="https://stackoverflow.com/questions/61573988/pyside2-cannt-display-iamge" target="_blank" rel="noopener noreferrer nofollow ugc">stackoverflow</a>, i hope to be inspired by as many people as possible, Thanks ~</p>
]]></description><link>https://forum.qt.io/topic/114372/pyside2-cannot-display-image</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Apr 2026 14:46:58 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/114372.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 03 May 2020 12:08:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PySide2 cannot display image on Mon, 04 May 2020 18:18:14 GMT]]></title><description><![CDATA[<p dir="auto">Do you need to do that for a completely new installation of PySide2 ?</p>
]]></description><link>https://forum.qt.io/post/592541</link><guid isPermaLink="true">https://forum.qt.io/post/592541</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 04 May 2020 18:18:14 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Mon, 04 May 2020 06:42:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/weida_wang">@<bdi>weida_wang</bdi></a><br />
These links are from several years ago, for old <strong>PySide</strong> rather than new <strong>PySide2</strong>.  I am surprised it is still the case: is this a bug, has it been reported on the Qt bugs site to the PySide2 people?</p>
]]></description><link>https://forum.qt.io/post/592393</link><guid isPermaLink="true">https://forum.qt.io/post/592393</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 04 May 2020 06:42:17 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 16:17:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a>  Hi, Guys, i find the correct solution here : <a href="https://stackoverflow.com/questions/24346038/pyside-qpixmap-not-working" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/24346038/pyside-qpixmap-not-working</a>.<br />
Thanks for everyone's  discussion !</p>
]]></description><link>https://forum.qt.io/post/592306</link><guid isPermaLink="true">https://forum.qt.io/post/592306</guid><dc:creator><![CDATA[weida_wang]]></dc:creator><pubDate>Sun, 03 May 2020 16:17:36 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 15:53:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a><br />
The OP claims on <strong>stackoverflow</strong> (better to have copied the post here than just reference it):</p>
<blockquote>
<p dir="auto">If the imported package is PyQt5, it can work ! But if i replace PyQt5 with PySide2, it can't work again</p>
</blockquote>
<p dir="auto">:)</p>
<p dir="auto">Which is why I want to verify he is running both from the same directory....</p>
]]></description><link>https://forum.qt.io/post/592303</link><guid isPermaLink="true">https://forum.qt.io/post/592303</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 03 May 2020 15:53:29 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 15:39:59 GMT]]></title><description><![CDATA[<p dir="auto">Did you check that the file is in fact a valid jpeg image ?</p>
]]></description><link>https://forum.qt.io/post/592301</link><guid isPermaLink="true">https://forum.qt.io/post/592301</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sun, 03 May 2020 15:39:59 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 15:10:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/weida_wang">@<bdi>weida_wang</bdi></a><br />
Then it really does sound like it's having trouble finding the file.  And I still don't get why that differ from PyQt, unless you are running the PySide from a different folder.</p>
]]></description><link>https://forum.qt.io/post/592297</link><guid isPermaLink="true">https://forum.qt.io/post/592297</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 03 May 2020 15:10:26 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 15:00:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a>  emm， it seems not the  layout issue, because <code>print(pixmap.isNull())</code> outputs <code>True</code> , looks like something is wrong here</p>
]]></description><link>https://forum.qt.io/post/592295</link><guid isPermaLink="true">https://forum.qt.io/post/592295</guid><dc:creator><![CDATA[weida_wang]]></dc:creator><pubDate>Sun, 03 May 2020 15:00:29 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 14:45:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/weida_wang">@<bdi>weida_wang</bdi></a><br />
FWIW: Try changing that guy's code so that you keep the original <code>QMainWindow::centralWidget()</code>, add a <code>Q[HV]BoxLayout</code> onto it, and add your <code>QLabel</code> onto that; and maybe put in some explicit sizes while you sort it out.  It's just possible you have a layout issue.  Also try <code>label.setScaledContents(True)</code>.  I'm not sure why it works from PyQt but not from PySide2.</p>
]]></description><link>https://forum.qt.io/post/592292</link><guid isPermaLink="true">https://forum.qt.io/post/592292</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 03 May 2020 14:45:23 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 14:38:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Thanks for your greeting ! Yes, i put the py script and cat.jpg in the same folder, even though i  pass the full path of cat.jpg, the window is still empty, please see the sreenshot (<a href="http://i.postimg.cc/ZqGW6xpz/image.png" target="_blank" rel="noopener noreferrer nofollow ugc">i.postimg.cc/ZqGW6xpz/image.png</a>)</p>
]]></description><link>https://forum.qt.io/post/592290</link><guid isPermaLink="true">https://forum.qt.io/post/592290</guid><dc:creator><![CDATA[weida_wang]]></dc:creator><pubDate>Sun, 03 May 2020 14:38:34 GMT</pubDate></item><item><title><![CDATA[Reply to PySide2 cannot display image on Sun, 03 May 2020 14:04:59 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Unless cat.jpg is in the same folder as where you start your python script, that won't work.</p>
]]></description><link>https://forum.qt.io/post/592285</link><guid isPermaLink="true">https://forum.qt.io/post/592285</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sun, 03 May 2020 14:04:59 GMT</pubDate></item></channel></rss>