PDA

View Full Version : using .INI files



duma
19th August 2011, 15:54
Hi guys,
I have a QComboBox in my window which has 2 options: Board 1 and Board2 which have their own specifications for values for variables used in my program. I want to use a .INI file to call these values. Under each board, I want to assign values to the following variables: nsine, nsquare, ntri and nmulti. I am trying to learn how to use .INI file to do this. Any help would be greatly appreciated.
My ini file looks something like this:


[board]
name = Board1

[values]
nsine = 8.56
nsquare = 8.56
ntri = 13.8
nmulti = 8.56

[board]
name = Board2

[values]
nsine = 10.5
nsquare = 10.5
ntri = 15.6
nmulti = 10.5

marcvanriet
19th August 2011, 16:48
Check out this thread : How-to-use-QSettings-to-read-INI-file (http://www.qtcentre.org/threads/21473-How-to-use-QSettings-to-read-INI-file)