[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QCanvas background
From:       John Califf <jcaliff () compuzone ! net>
Date:       2000-11-20 20:15:47
[Download RAW message or body]

Anatoli Gorchetchnikov wrote:
> 
> Hi!
> 
> Sorry, it's more a newbie-qt question:
> Is there a way to set QCanvas background to be transparent?
> Or maybe newbie-kde one: how can I set it to whatever background
> the current theme uses?
> 
> --

Yes, you can establish a background pixmap for a regular QCanvas.  Read
the qt docs in html fomat - Classes -> QCanvas.  I don't know about how
Kde might use QCanvas in its desktop, but look and see in
kdebase/kdesktop/.  It's just a matter of copying the data from one
pixmap to another, or even setting a pointer to the QPixmap you want to
use in the QCanvas instance, if one is alread there.  Otherwise you may
have to allocate it.  Some QCanvases don't have background pixmaps.
There is also a method to check for null pixmaps. Backbground pixmaps
are most often used in games, but not limited to them.  If the pixmap
has an alpha channel (is based on an image with one) it can be
transparent.

John
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic