diff DisplayModel.py @ 225:f6dcc85cd8ca

use SIP API v2
author Dirk Olmes <dirk@xanthippe.ping.de>
date Thu, 22 May 2014 05:49:46 +0200
parents 699d8f1cebd4
children
line wrap: on
line diff
--- a/DisplayModel.py	Thu May 22 05:49:14 2014 +0200
+++ b/DisplayModel.py	Thu May 22 05:49:46 2014 +0200
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from PyQt4.QtCore import QAbstractListModel, QModelIndex, QVariant, Qt
+from PyQt4.QtCore import QAbstractListModel, QModelIndex, Qt
 
 class DisplayModel(QAbstractListModel):
     def __init__(self, parent=None, list=None, displayAttribute=None, **args):
@@ -15,9 +15,9 @@
             row = index.row()
             item = self.list[row]
             displayString = self._stringToDisplay(item)
-            return QVariant(displayString)
+            return displayString
         else:
-            return QVariant()
+            return None
 
     def _stringToDisplay(self, item):
         if hasattr(item, self.displayAttribute):