PDA

View Full Version : parsing ini file in qt using custom parser



akshaysulakhe
9th July 2013, 17:49
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_name").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.

ChrisW67
9th July 2013, 21:52
:confused:
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.

zgulser
9th July 2013, 23:25
You may check QSettings for such issues.