Results 1 to 6 of 6

Thread: Settings for a particular file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Settings for a particular file

    Since you've acknowledged that the user may move the file to a different directory, and the filename alone doesn't provide unique identification, take a moment and convince yourself that any amount of fiddling with QSettings will fail to do what you want. Unless you can lock down the file's location in a predefined directory structure which never varies, your only alternative is to store your information in the file itself - either internally (the best solution, if possible) or by embedding information in the filename. The latter is also problematic, since the user can rename the file to whatever they want.

    If the files in question are created by you and are unique to your application, store the information internally.

  2. #2
    Join Date
    May 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Settings for a particular file

    It is exactly what I wanted to do, but I wanted to be sure there were no other better solutions before starting development. Thanks a lot for the help given.

Similar Threads

  1. How to link static libraries --- in .pro file settings?
    By jiapei100 in forum Qt Programming
    Replies: 1
    Last Post: 7th January 2010, 16:39
  2. XML vs file sotring settings
    By ^NyAw^ in forum Qt Programming
    Replies: 3
    Last Post: 7th May 2009, 16:13
  3. .pro settings for obj subdir
    By bajarangi in forum Newbie
    Replies: 2
    Last Post: 17th April 2009, 14:31
  4. KPart settings?
    By maartenS in forum KDE Forum
    Replies: 1
    Last Post: 26th November 2008, 08:43
  5. qSplitter settings
    By ovidiu.sabou in forum Qt Tools
    Replies: 4
    Last Post: 14th March 2006, 18:24

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
  •  
Qt is a trademark of The Qt Company.