python - Putting CSV data into a table in PyQt4 -


this question has answer here:

currently have csv file

with open('my csv file ', 'r') csv:                 line = csv.reader(csvf, delimiter=' ', quotechar='|')                 row in line:                      print ",".join(row)                      #if print(account) print accounts shell,  

how each line table in pyqt4? using pyqt.qlabel somehow? documentation on creating tables isn't clear me.

use pyqt table widget. can specify column in table widget , after can set value cell of table widget. can use .setitem function set value

item = qtablewidgetitem() item.settext("blah blah") self.tablewidget.setitem(n, 0, item) 

where n row , 0 column , item value.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -