As @xndrme said in comment:
This self.tableWidget.setItem(1,i,item2) should be self.tableWidget.setItem(i,1,item2)
I've make test with PyQt4 and Python26 and second column is empty for me, unless I convert data[name]
to string like this:
item2 = QtGui.QTableWidgetItem(str(data[name]))
also this line self.tableWidget.setColumnCount(len(list(data.viewitems())[0]))
gives this error: 'dict' object has no attribute 'viewitems'
so I've simply set 2 columns self.tableWidget.setColumnCount(2)