Results 1 to 17 of 17

Thread: using QSettings to read an ini file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: using QSettings to read an ini file

    Amm... you code it?
    Or I don't understand your question.
    Look in to QSettings to see what it does when you call value().
    Step through, and see what makes it return and not read the line.
    In your subclass then, introduce code that will allow dealing with such lines as the one you have.

    Another options is to not use QSettings at all, but write your own class for it.
    Since you have rather a simple case (each key is the start of a line, and ends with '=', and value is everything until the end of the line) this should be rather easy to implement.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. The following user says thank you to high_flyer for this useful post:

    gye325 (20th July 2011)

Similar Threads

  1. Read Several Groups in INI file from QSettings
    By deepal_de in forum Qt Programming
    Replies: 3
    Last Post: 5th July 2011, 09:43
  2. How to use QSettings to read INI file
    By Cantora in forum Newbie
    Replies: 8
    Last Post: 16th June 2011, 08:14
  3. Replies: 1
    Last Post: 14th January 2011, 11:57
  4. QSettings , read only avaiable?
    By patrik08 in forum Qt Programming
    Replies: 5
    Last Post: 18th November 2007, 15:21
  5. Using QSettings to read pre-made INI file..
    By ShaChris23 in forum Newbie
    Replies: 1
    Last Post: 3rd May 2007, 05:36

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.