Results 1 to 3 of 3

Thread: parsing ini file in qt using custom parser

  1. #1
    Join Date
    Jul 2013
    Posts
    27
    Thanks
    11
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default parsing ini file in qt using custom parser

    I am using a custom made INI parser, for which the parameters are the form name, parent widget. The syntax looks like this:

    int width = w->findchild("form_name","section_to_be_accessed_nam e").toInt();

    I maybe a little bit wrong with the syntax, because I don't have the code with me right now. I want to add a few labels which are mentioned in page 2 of the INI file. The properties of those images are mentioned in the ini file itself. Even the absolute path,etc.

    I tried multiple combinations, but it doesn't work. Can anyone give me a syntax for the same? What should be the return value here? A label, I have already created labels in Qt designer. Let's say label1. But there are many labels. Kindly let me know.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,734
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: parsing ini file in qt using custom parser


    You use your custom ini file reader however it is supposed to be used. We cannot tell you how because we cannot see it. The data type of values in the ini file is whatever the data type of the value is. Once again, we cannot help because we cannot see. Chances are that a file path stored in the ini file is a string.

  3. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: parsing ini file in qt using custom parser

    You may check QSettings for such issues.

Similar Threads

  1. Replies: 2
    Last Post: 13th July 2014, 03:09
  2. Parsing a Qt ts file....
    By PaladinKnight in forum Qt Programming
    Replies: 0
    Last Post: 20th May 2012, 23:01
  3. Problem in editing xml file through Dom parser.
    By Niamita in forum Qt Programming
    Replies: 5
    Last Post: 20th September 2011, 09:02
  4. problem in reading xml file with SAX parser.
    By Niamita in forum Qt Programming
    Replies: 11
    Last Post: 14th September 2011, 10:13
  5. Which parser is better for edit xml file.
    By Niamita in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2011, 07:27

Tags for this Thread

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.