How to add Qt Application icon in ubuntu?
-
Hi,
-
@vaibs
@SGaist has tried to help.You haven't explained what it is you want to do.
If it's set the icon while an application is running, you can use
QMainWindow::setWindowIcon()
.If it's set the icon for a desktop launcher, you'll have to create a
.desktop
file and put it on the right place. Mine happens to look like:[Desktop Entry] Version=1.0 Type=Application Name=Jinn Icon=jinn.png Exec=python3 "Jinn/Code/home.py" Comment=Jinn Application Categories=Application Terminal=false
Where that goes depends on desktop manger. Which you have not specified.
I don't have time right now to type any more, see how you go.
-
I want set icon after run application in qt
Then if you're not trying to have the icon as a clickable link on your desktop, but simply to show up as the icon for the application once you run it, you won't need a
.desktop
file, you'll only need theQMainWindow::setWindowIcon()
.But i want this work on ubuntu
That's why I gave you a working example on Ubuntu.
-
Can you please share how you solved it ?