PDA

View Full Version : Transparent button icon



alenn.masic
4th November 2012, 08:29
Hi all

I have transparent button icon, it's transparent when I open it with picture viewer but when I import it in Qt and set it as button icon it's not transparent anymore. How to fix this.

I'm setting icon like this:

QPushButton button = new QPushButton(QIcon("image-path"), "Button-text", this);

cbamber85
4th November 2012, 11:30
How do you know it is not transparent, are the transparent areas being rendered white?

alenn.masic
4th November 2012, 11:35
I know because I'm supposed to see image behind button. And yes, it's rendered white.