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

List:       pykde
Subject:    Re: [PyKDE] Re: Shading after QListView.setSelected()
From:       Hans-Peter Jansen <hpj () urpla ! net>
Date:       2005-03-29 16:26:13
Message-ID: 200503291826.13216.hpj () urpla ! net
[Download RAW message or body]

Hi Jeffrey,

On Tuesday 29 March 2005 18:02, Jeffrey Barish wrote:
> Phil Thompson wrote:
> >
> > Can you post a small, complete example that demonstrate's the
> > problem - and the text of the exception?

> class MyListView(QListView):
> [...]
>     def getSelections(self):
> [...]
>         for thing in self.things:
>             lvi = MyListViewItem(self, thing['data'])
>             for col, key in zip(range(len(self.keys)), self.keys):
>                 lvi.setText(col, thing['text'])
>
>         self.setSelected(self.firstChild(), True)
>         self.firstChild().setEnabled(True)  # produces
> AttributeError
>
> class MyListViewItem(QListViewItem):
>     def __init__(self, parent, data):
>         QListViewItem.__init__(self, parent)
>         self.data = data
>
>     def getItemData(self):
>         return self.data

Since your sample code isn't complete in this form, it's hard to tell 
you _anything_. Do you really expect us to form something runable 
from your artefacts to prove you right or wrong? 

Pete

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

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