PDA

View Full Version : Installation of application data files



anderssonj
4th July 2007, 15:41
Does Qt provide any means of finding out where application-specific data files are installed, so that I can avoid hard coded installation paths?

Let's say that I have a file called blob.bin that goes with my application. It's just a generic data file, not an image or audio file or anything. What do I do in my .pro file to install it, and how do I find the location from my source code?

wysota
4th July 2007, 17:02
If it doesn't reside in either the directory where the application binary is located (or in a known place relative to it) or a "well known directory" like /usr/share/appname, then I suggest you store the path to the file using QSettings.