gui: use monospace font in log

This commit is contained in:
Sebastien Bourdeauducq 2015-07-25 11:38:26 +08:00
parent ef8b09d9bc
commit 5979f85c1c
1 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,15 @@ class _LogModel(ListSyncModel):
ListSyncModel.__init__(self, ListSyncModel.__init__(self,
["RID", "Message"], ["RID", "Message"],
parent, init) parent, init)
self.fixed_font = QtGui.QFont()
self.fixed_font.setFamily("Monospace")
def data(self, index, role):
if (role == QtCore.Qt.FontRole and index.isValid()
and index.column() == 1):
return self.fixed_font
else:
return ListSyncModel.data(self, index, role)
def convert(self, v, column): def convert(self, v, column):
return v[column] return v[column]