[Qt-interest] Draw A Disabled Custom Widget As Gray
tangke
tangk at lemote.com
Sat Jul 25 12:56:11 CEST 2009
On 07/24/2009 04:04 PM, Karol Krizka wrote:
> On Fri, Jul 24, 2009 at 9:24 AM, tangke<tangk at lemote.com> wrote:
>
>> do you rewrite the paintEvent function?
>>
>>
> Yes, that is what I mean by "custom-drawn". I override the paintEvent
> function, where I paint a QPixmap.
>
>
you can add the next in paintEvent function
QPainter paint(this);
QPixmap px = QPixmap(path);
paint.drawPixmap(0,0, px);
> --
> Cheers,
> Karol Krizka
>
>
>
>> best regards
>> On 07/24/2009 01:58 AM, Karol Krizka wrote:
>>
>>> Hi there,
>>>
>>> I have a custom-drawn widget that I would like to draw grayed out when
>>> in disabled state. What is the best way to accomplish this? I though
>>> about
>>>
>>> The drawing part consists of painting a QPixmap.
>>>
>>> --
>>> Cheers,
>>> Karol Krizka
>>> _______________________________________________
>>> Qt-interest mailing list
>>> Qt-interest at trolltech.com
>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>
>>>
>>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
More information about the Qt-interest-old
mailing list