[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Re: Fixed... QComboBox and Models
From:       Martin =?utf-8?q?H=C3=B6fling?= <martin.hoefling () gmx ! de>
Date:       2008-02-27 10:39:27
Message-ID: 200802271139.27548.martin.hoefling () gmx ! de
[Download RAW message or body]

Am Tuesday, 26. Februar 2008 schrieb Martin Höfling:

OK, found it myself.

>     def data(self,index,role=Qt.DisplayRole):
>         if not index.isValid() or not (0<=index.row() < len(self.list)):
>             return QVariant()
>         if role == Qt.DisplayRole or role == Qt.EditRole:
>             return QVariant(self.list[index.row()])
>         else:
>             return QVariant(self.list[index.row()])

The last line is...
...stupid. ;-)

Cheers
	Martin



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic