Updating KAboutData on runtime

Friedrich W. H. Kossebau kossebau at kde.org
Mon Mar 22 10:47:09 GMT 2010

Hi Rafael,

Lundi, le 22 mars 2010, à 02:00, Rafael Fernández López a écrit:
> Hi,
> On a KDE application I am writing I have a small problem. On the
> KAboutData information, at setOtherText() method precisely, I need to
> add because of legal reasons an icon. This icon is installed with the
> application, in the appdata folder, into "images" subfolder.
> As you can imagine, I have to show this image on the KAboutData
> dialog, but I cannot find the way, since once I have created the
> KUniqueApplication instance, it already got the KAboutData info, and I
> need to access KStandardDirs to access this pixmap, so I need the
> KUniqueApplication instance.
> So, the main question is: how can I do this ? Can I update the
> KAboutData information on runtime like this:
> 1) Create the KAboutData without the setOtherText()
> 2) Create the application instance
> 3) Set KAboutData setOtherText() accessing KStandardDirs
> 4) Update somehow KAboutData
> and expect the about dialog to be updated ?

AFAIR yes (seen this been done for the logo). There is just the one instance 
of KAboutData as created in the beginning, no data is copied, so operating on 
that instance will get you what you want, as KAboutDialog is using the content 
of that instance (on first show only? no idea if the dialog is cached, but you 
should be able to do the modification before the first show).

KDE Okteta - a simple hex editor - http://utils.kde.org/projects/okteta

More information about the kde-core-devel mailing list