Subject: [Interest] Custom QPushButton
You can do whatever you want by subclassing QPushButton and reimplementing
paintEvent function.
using QStyleOptionButton you can draw the button exactly like a normal one but
looking allways like normal state, just set the propper button feature for the
Hi again,
On 21.11.2013 18:11, Graham Labdon wrote:
> Say I have a push button for which I have set an icon and set the text to an
> empty string.
> When this is displayed all I see is the Icon, which is what I want.
> However when the button is clicked the rectangular background for the button
Hi,
or, even shorter:
---8<---
QPushButton,
QPushButton:hover,
QPushButton:pressed,
QPushButton:default,
PushButton:disabled
{
// common content
}
--->8---
Regards,
Bernhard
On 21.11.2013 18:00, William Hallatt wrote:
> Hi Graham,
>
> If I remember correctly, you should be able to do that w
ing
>
>
>
> Thanks
>
>
>
> *From:* williamhall...@gmail.com [mailto:williamhall...@gmail.com] *On
> Behalf Of *William Hallatt
> *Sent:* 21 November 2013 17:00
> *To:* Graham Labdon
> *Cc:* interest@qt-project.org
> *Subject:* Re: [Interest] Custom QPushButton
>
You can do whatever you want by subclassing QPushButton and reimplementing
paintEvent function.
using QStyleOptionButton you can draw the button exactly like a normal one but
looking allways like normal state, just set the propper button feature for the
styleOption
Hi Graham,
If I remember correctly, you should be able to do that with stylesheets
also, e.g if you don't want the button to change, ever, you could do
something like this:
QPushButton
{
// content is the same as all the others
}
QPushButton:hover
{
// content is the same as all the others
}
QP
amhall...@gmail.com [mailto:williamhall...@gmail.com] *On
> Behalf Of *William Hallatt
> *Sent:* 21 November 2013 17:00
> *To:* Graham Labdon
> *Cc:* interest@qt-project.org
> *Subject:* Re: [Interest] Custom QPushButton
>
>
>
> Hi Graham,
>
> If I remember correc
Hi
How can I stop the appearance of a QPushButton changing when it is hovered over
or pressed.
I know how to change the background colour for these events by setting the
appropriate stylesheet, but cannot see how I can stop them changing at all.
I would appreciate some help in getting this workin
color.
Any idea how I can stop this happening
Thanks
From: williamhall...@gmail.com [mailto:williamhall...@gmail.com] On Behalf Of
William Hallatt
Sent: 21 November 2013 17:00
To: Graham Labdon
Cc: interest@qt-project.org
Subject: Re: [Interest] Custom QPushButton
Hi Graham,
If I remember