python - Putting CSV data into a table in PyQt4 -
this question has answer here:
- pyqt - populating qtablewidget csv data 2 answers
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
Post a Comment