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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -