[Kde-games-devel] Re: Resource directory
Andreas Beckermann
b_mann at gmx.de
Tue Oct 14 18:37:19 CEST 2003
On Tuesday 14 October 2003 02:34, cantabile wrote:
> Dear list,
Hi
> I'm trying to access pix resources from a directory in my project :
[...]
> When I write :
> QString pixdir = kapp->dirs()->findResourceDir("data", "pics/bd.png")
> new QLabel( pixdir, this, "pix directory");
Try findResourceDir("data", "your_app_name/pics/bd.png");
your_app_name is the name that you provided to KAboutData in main. Usually all
lowercase. It is also the name of the directory of your app in
$KDEDIR/share/apps/
[...]
> What am I missing ?
A grep -r findResourceDir * in kdegames, which would have told you that your
appname is part of the path ;-)
> Thanks for your help.
CU
Andi
More information about the kde-games-devel
mailing list