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

List:       kde-panel-devel
Subject:    Re: A problem with QPushButton on a plasma applet
From:       Jason Stubbs <jasonbstubbs () gmail ! com>
Date:       2008-05-26 15:30:14
Message-ID: 200805270030.14118.jasonbstubbs () gmail ! com
[Download RAW message or body]

On Thursday 22 May 2008 01:09:33 JST, Alexis Ménard wrote:
> Calling this on a QWidget remove grey boxes we have (if we talk about the
> same boxes) :
>
> mWidget->setAttribute(Qt::WA_NoSystemBackground);
> mWidget->setAutoFillBackground (false);
>
> One example is notes applet wich call these two lines...It allow the
> embeeded widget to be transparent...

This is not really the best way to make a widget transparent. Given a label, 
for example, it will appear fine at first but will become garbled if you 
change its text. Furthermore, changes to the parent widget that lie 
underneath won't show through. At least that's what will happen with real 
widgets; I haven't tried it with alien widgets on a canvas.

Any reason why Toussis Manolis's code (below) doesn't work? If using 
NoSystemBackground is the only way then this issue should really be sent 
upstream.

QPalette pal1(m_buttonNext->palette());
pal1.setColor(QPalette::Window, Qt::transparent);
m_buttonNext->setPalette(pal1);
m_buttonNext->setBackgroundRole(QPalette::Window);

-- 
Jason Stubbs
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel

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

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