0
def contador(self):

    estado=self.ui.chbL01
    lugar=self.ui.lineEdit
    global contadorr

    if(estado.isChecked()):
        contadorr=contadorr+1
        self.ui.lineEdit.setText(str(contadorr))
        config = ConfigParser.RawConfigParser()
        pedidos=open("pedidos.ini",'w')
        config.add_section(str(contadorr))
        config.write(pedidos)
        pedidos.close()

I want to create a section from contador.

Matt Bryant
  • 4,841
  • 4
  • 31
  • 46

1 Answers1

0

Use QSettings.

Official docs: http://doc.qt.io/qt-5/qsettings.html

Python version: http://pyqt.sourceforge.net/Docs/PyQt4/pyqt_qsettings.html

jesterjunk
  • 2,342
  • 22
  • 18
Mathijs
  • 347
  • 1
  • 4
  • 13