<?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 create custom Button that inherits from QPushButton]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I created a custom Button that inherited from QPushButton because I wanted to customized the look and feel.<br />
So I implemented the PaintEvent(QPaintEvent *e) method, thinking that this method would be called when I create my custome Button in the code, but in debugging I realized that the PainEvent() method never gets called and what gets displayed when the custom Button is created is just a plain QPushButton  with the default look and feel skin.<br />
So I don't understand than how can one overwrite the default PaintEvent() of the QPushButton.</p>
<p dir="auto">Does anyone have an example, some code I can look at?</p>
<p dir="auto">thank you</p>
<p dir="auto">-Malena</p>
]]></description><link>https://forum.qt.io/topic/4729/how-create-custom-button-that-inherits-from-qpushbutton</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 05:19:51 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/4729.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Mar 2011 22:33:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How create custom Button that inherits from QPushButton on Thu, 31 Mar 2011 08:21:41 GMT]]></title><description><![CDATA[<p dir="auto">Even with style sheets case does matter. It does everywhere in C++.</p>
]]></description><link>https://forum.qt.io/post/81974</link><guid isPermaLink="true">https://forum.qt.io/post/81974</guid><dc:creator><![CDATA[andre]]></dc:creator><pubDate>Thu, 31 Mar 2011 08:21:41 GMT</pubDate></item><item><title><![CDATA[Reply to How create custom Button that inherits from QPushButton on Wed, 30 Mar 2011 23:49:14 GMT]]></title><description><![CDATA[<p dir="auto">Thanks guys for the help.  Volker you were right, I was using PaintEvent(), I will try to fix this later. And Vinb , yeah, I ended up using the StyleSheet() in the meantime.</p>
<p dir="auto">Best</p>
<p dir="auto">-malena</p>
]]></description><link>https://forum.qt.io/post/81928</link><guid isPermaLink="true">https://forum.qt.io/post/81928</guid><dc:creator><![CDATA[mmesarina]]></dc:creator><pubDate>Wed, 30 Mar 2011 23:49:14 GMT</pubDate></item><item><title><![CDATA[Reply to How create custom Button that inherits from QPushButton on Wed, 30 Mar 2011 22:53:03 GMT]]></title><description><![CDATA[<p dir="auto">Did you implement PaintEvent() or paintEvent()? The case of the p does matter!</p>
]]></description><link>https://forum.qt.io/post/81926</link><guid isPermaLink="true">https://forum.qt.io/post/81926</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Wed, 30 Mar 2011 22:53:03 GMT</pubDate></item><item><title><![CDATA[Reply to How create custom Button that inherits from QPushButton on Wed, 30 Mar 2011 22:45:23 GMT]]></title><description><![CDATA[<p dir="auto">mayby you have enough with the "stylesheets":<a href="http://doc.qt.nokia.com/latest/stylesheet.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.nokia.com/latest/stylesheet.html</a>?</p>
]]></description><link>https://forum.qt.io/post/81923</link><guid isPermaLink="true">https://forum.qt.io/post/81923</guid><dc:creator><![CDATA[vinb]]></dc:creator><pubDate>Wed, 30 Mar 2011 22:45:23 GMT</pubDate></item></channel></rss>