<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python GUIs - inheritance</title><link>https://www.pythonguis.com/</link><description>Create GUI applications with Python and Qt</description><atom:link href="https://www.pythonguis.com/feeds/inheritance.tag.rss.xml" rel="self"/><lastBuildDate>Mon, 11 May 2020 09:00:00 +0000</lastBuildDate><item><title>Understanding .parent() vs. Parent Class in PyQt6 Custom Widgets — Why self.parent() doesn't mean what you think it means</title><link>https://www.pythonguis.com/faq/parent-vs-parent-class-in-powerbar-example/</link><description>In a custom widget example, the &lt;code&gt;_Bar&lt;/code&gt; class uses &lt;code&gt;self.parent()&lt;/code&gt; to access a &lt;code&gt;QDial&lt;/code&gt; object defined in the &lt;code&gt;PowerBar&lt;/code&gt; class. But &lt;code&gt;_Bar&lt;/code&gt; inherits from &lt;code&gt;QWidget&lt;/code&gt; &amp;mdash; so shouldn't &lt;code&gt;self.parent()&lt;/code&gt; refer to &lt;code&gt;QWidget&lt;/code&gt;? What's going on here?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin Fitzpatrick</dc:creator><pubDate>Mon, 11 May 2020 09:00:00 +0000</pubDate><guid>tag:www.pythonguis.com,2020-05-11:/faq/parent-vs-parent-class-in-powerbar-example/</guid><category>pyqt6</category><category>python</category><category>widgets</category><category>qt</category><category>inheritance</category><category>qt6</category></item></channel></rss>