Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
KAboutApplication: what's wrong
void app::showAbout()
{
KAboutApplication * about = new KAboutApplication::KAboutApplication( this, "about", TRUE );
KIconLoader * loader = new KIconLoader();
QPixmap app_ico;
app_ico.load( loader->iconPath( QString( "app" ), -32 ) );
about->setLogo( app_ico );
about->exec();
delete loader;
}
I see the wrong (empty) icon in my about; why?
If i set the icon with about->setIcon("/usr/share/icons/hicolor/32x32/apps/app.png" ); it works.
Maybe you should use the configured icon loader of your application instead of creating a new one.
Cheers,
_
Qt/KDE Developer
Debian User
Thanks,
i've seen that KApplication inherits KIstance that has KIconLoader *
iconLoader () const but.... i'm a newbie... how can i access this iconloader?
I mean: to access QApplication i can use qApp but i don't know how to access my KApplication from the code of my KMainWindow.
S O L V E D ! ! !
I searched and found kapp.
The documentation say:
This instance is always accessible via the 'kapp' global variable.
You can also use KApplication::kApplication() that's a static method.
Another way is to use KGlobal::instance()
Cheers,
_
Qt/KDE Developer
Debian User