This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Icon in "About" button and window

Tags: None
(comma "," separated)
bourriquet42
Registered Member
Posts
2
Karma
0

Icon in "About" button and window

Fri Jul 03, 2009 3:16 pm
Hello,

Where exactly do we choose the icon for the About data in a KDE program?

Here is my code for the KAboutData

Code: Select all
KAboutData about(
         "my-app",
         "my-app",
         ki18n("My App"),
         version,
         ki18n(description),
         KAboutData::License_GPL_V3,
         ki18n("(C)"),
         KLocalizedString(),
         website,
         emailAddress);


The icons "my-app.png" are well installed in /usr/share/icons/hicolor/16,32... and it works when I do the
Code: Select all
addPage( dlgGeneral, i18n("General"), "my-app" );

stuff in the config dialog.
But in the help menu, the "About My App" button and its window have no icon.

I tried "about.setProgramLogo" but it only worked in the window but not in the menu, and I shouldn't need that trick anyway.

Thanks
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Try the following, which comes from System Settings ( change preferences-system to the name of your icon )
Code: Select all
aboutData.setProgramIconName("preferences-system");


You may also wish to check the full documentation at api.kde.org
bourriquet42
Registered Member
Posts
2
Karma
0
Sorry, I was being stupid.
I forgot a
Code: Select all
about.setProgramIconName("my-app.png");

somewhere, so it didn't find it.
Thank you for your help!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]