[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: locate
From: Anne-Marie Mahfouf <annemarie.mahfouf () free ! fr>
Date: 2004-05-02 19:59:32
Message-ID: 200405021601.30743.annemarie.mahfouf () free ! fr
[Download RAW message or body]
On May 2, 2004 04:31 pm, Manuel Pérez López wrote:
> Hi:
>
> Does anyone know how to use Kstandarddirs to locate images of an
> application in develop?.
>
> Thanks
>
> Manuel Pérez
Hi,
You don't locate anything "in" KDevelop.
Via your Makefile.am, you install images used by your application. They should
be installed in a standard KDE dir like $KDEDIR/share/apps/myApp/pics
using something like:
picsdir = $(kde_datadir)/myApp/pics
pics_DATA = myPic.png
(note that usually it's best to have a subfolder called pics in your src
folder and put all the images here)
In your code, you will put:
#include <kstandarddirs.h>
and get the myPic.png like:
locate("data","myApp/pics/myPic.png");
In KDevelop, don't forget to run
'make install' via the Build menu -> Install (or Install as root depending of
your configuration)
so myPic is indeed installed and your code can find it.
Hope this answers your question.
annma
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic