Mercurial > hg > Feedworm
diff FeedEntryTableModel.py @ 225:f6dcc85cd8ca
use SIP API v2
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 22 May 2014 05:49:46 +0200 |
parents | bb3c851b18b1 |
children | 6ce0e081094a |
line wrap: on
line diff
--- a/FeedEntryTableModel.py Thu May 22 05:49:14 2014 +0200 +++ b/FeedEntryTableModel.py Thu May 22 05:49:46 2014 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from PyQt4.QtCore import QAbstractTableModel, QVariant, Qt +from PyQt4.QtCore import QAbstractTableModel, Qt class TableModel(QAbstractTableModel): ''' @@ -12,18 +12,18 @@ def headerData(self, section, orientation, role): if orientation == Qt.Horizontal and role == Qt.DisplayRole: value = self.headerDataForColumn(section) - return QVariant(value) + value else: - return QVariant() + return None def data(self, index, role): if not index.isValid(): - return QVariant() + return None elif role != Qt.DisplayRole: - return QVariant() + return None else: value = self.dataForRowAndColumn(index.row(), index.column()) - return QVariant(value) + return value class FeedEntryTableModel(TableModel):