Qt 6.11 is out! See what's new in the release
blog
[SOlved] How to make a QIcon transparent ?
Mobile and Embedded
5
Posts
3
Posters
9.5k
Views
1
Watching
-
Hello,
I have a listview with icons how it's explained "here":http://www.developer.nokia.com/Community/Wiki/CS001339_-_QListView_with_icons .
I want to make these icons transparent ?
How can I achieve this ?
Thank you
-
Now I know how to include resources with QRC file but howto make an QIcon transparent ?!
-
Oh, yeah, this was very simple, too simple for me to be thought at at first.
Of course this works now, very well. -
A solution in code (event though it slightly misses the point of the question):
@ QPixmap pixmap(16, 16);
pixmap.fill(QColor("black"));
pixmap.setAlphaChannel (pixmap);
QIcon transparentIcon(pixmap);
@