<?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[How to set icon on Qlabel in pyside2]]></title><description><![CDATA[<p dir="auto">Hello<br />
I try to display an icon on the label please provide some solution ho to show below my code how I trying to display.<br />
self.lableImg = self.embeddedAppUpdate.findChild(QLabel, "lbl_img")<br />
self.lableImg.setPixmap(QPixmap("icon/exit.png"))<br />
self.lableImg.setMask(QPixmap("icon/exit.png").mask())<br />
self.lableImg.show()</p>
]]></description><link>https://forum.qt.io/topic/119079/how-to-set-icon-on-qlabel-in-pyside2</link><generator>RSS for Node</generator><lastBuildDate>Fri, 08 May 2026 00:40:50 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/119079.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Sep 2020 10:45:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to set icon on Qlabel in pyside2 on Thu, 17 Sep 2020 10:49:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
There is nothing more to it than setPixmap.<br />
If nothing shows its most likely due to path.<br />
you are using icon/exit.png<br />
try with full path and see.</p>
<p dir="auto">and then maybe consider using a QRessouce file to hold the png's<br />
<a href="https://doc.qt.io/qtforpython/overviews/resources.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtforpython/overviews/resources.html</a></p>
]]></description><link>https://forum.qt.io/post/617551</link><guid isPermaLink="true">https://forum.qt.io/post/617551</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 17 Sep 2020 10:49:26 GMT</pubDate></item></channel></rss>