title: Load values from INI file to combo box
body: <p>I have a <code>GUI</code> (created with <em>PyQt5 &amp; Python3.4</em>). I have a pair of <em>combobox</em> : the first is brand of cars and the second one is models of the brand selected.</p>
  
  <p>I have an <code>INI file</code> to save the last values entered in the <code>GUI</code>, so when I re open the <code>GUI</code>, the last values/parameters are automatically put.
  This works for all my other parameters, except for the <em>combobox</em>.
  I write the <code>currentIndex</code> in the <code>INI file</code>, when I close my <code>GUI</code> the correct index is written in the INI file, but when i open the <code>GUI</code> again, the index is changed to 0.</p>
  
  <p>This is what my code looks like :</p>
  
  <pre><code>def comboSelect(self):
  
      config = configparser.ConfigParser()
      config.read('D:\File\save.ini')
  
      self.indexModel = ui.dmpModele.currentIndex()
      config.set('de_sec', 'dmp_modele', str(self.indexModel))
  
      with open('D:\File\save.ini', 'w') as configfile:
          config.write(configfile) # write the index in the INI file
  
  if __name__ == "__main__":
  
      config = configparser.ConfigParser()
      config.read('D:\File\save.ini')
  
      p.indexModel = config.get('de_sec', 'dmp_modele') # get the value of index from INI file
      ui.dumperModele.setCurrentIndex(int(p.indexModel)) # pass the index to combo box
  </code></pre>
  
  <p>What have I missed ?</p>