How to add Qt Application icon in ubuntu?
-
wrote on 26 Apr 2019, 07:57 last edited byThis post is deleted!
-
wrote on 26 Apr 2019, 08:00 last edited by
Hiii
How to add Qt application icon in ubuntu? -
Hi,
-
wrote on 26 Apr 2019, 10:29 last edited by
I have read all documentation ..and try to implement that but not work..please help
-
wrote on 26 Apr 2019, 11:28 last edited by JonB
@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.
-
@JonB Thank you..
I will try...
I want set icon after run application in qt..But i want this work on ubuntuwrote on 30 Apr 2019, 11:54 last edited byI 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 ?
-
wrote on 4 May 2019, 06:50 last edited by
QMainWindow::setWindowIcon("name _of_png_file");
2/11