I have QStandardItemModel and QTableView. I want to have the number align to the right. How can i specify this in pyqt?
Now i have it like this (see ID) http://simple-database-explorer.googlecode.com/files/Main2.jpg
Working example:
self.model.setData(self.model.index(i, j, QtCore.QModelIndex()), value, role=0)
if isNumber(value):
self.model.setData(self.model.index(i, j, QtCore.QModelIndex()), QtCore.QVariant(QtCore.Qt.AlignRight), QtCore.Qt.TextAlignmentRole)