Hi,

I want to get the text from a QTextEdit widget into a list, to parse and store in a database

I found this solution, but I think there is a cleaner way of doing it


   def Imprimir(self):
       doc = self.texto.document()
       block = doc.begin()
       lines = [ block.text() ]
       for i in range( 1, doc.blockCount() ):
           block = block.next()
           lines.append( block.text() )

where :
self.texto = QtGui.QTextEdit(self.widget)


Paulino
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to