Results 1 to 2 of 2

Thread: Installation of application data files

  1. #1
    Join Date
    Jun 2007
    Posts
    7
    Thanks
    1

    Default Installation of application data files

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Installation of application data files

    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.

  3. The following user says thank you to wysota for this useful post:

    anderssonj (4th July 2007)

Similar Threads

  1. How to open IGES files in Qt Application?
    By Shuchi Agrawal in forum Newbie
    Replies: 1
    Last Post: 21st February 2007, 01:06
  2. fast writing of large amounts of data to files
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2007, 16:33
  3. Embedding binary data into an application
    By Valheru in forum Qt Programming
    Replies: 5
    Last Post: 1st September 2006, 14:23
  4. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.