From 79a1a95a439826218a5720d6887e278caf73fb17 Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Mon, 25 Aug 2014 12:31:33 +0200 Subject: [PATCH] Add table header. --- pixelocr/gui/glypheditor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pixelocr/gui/glypheditor.py b/pixelocr/gui/glypheditor.py index c7ba55a..de45eae 100644 --- a/pixelocr/gui/glypheditor.py +++ b/pixelocr/gui/glypheditor.py @@ -56,6 +56,12 @@ class GlyphDBModel(QAbstractTableModel): self.images[key] = image return image + def headerData(self, section, orientation, role): + if orientation != Qt.Horizontal or role != Qt.DisplayRole: + return None + if section == 0: + return 'Text' + def data(self, index, role): if index.column() == 0: key = self.keys[index.row()]