[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] QListView
From: Fredrik Juhlin <laz () strakt ! com>
Date: 2002-12-21 17:26:44
[Download RAW message or body]
On Sat, Dec 21, 2002 at 07:13:25PM +0200, Oleksandr Yakovlyev wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> maybe it is off topic, but i not found nothing yet about it:
>
> If i defined my own ListViewItem with my functions
>
> class MyListViewItem(QListViewItem)
> ...
>
> class MyListView(QListView)
> ...
> self.connect(listview, SIGNAL("clicked ( QListViewItem * item )"),
> self.myslot )
>
> what type of object I will receive with signal
> "clicked ( QListViewItem * item )" ?
Since you'll get an instance of an item in the list, it will be a
MyListViewItem (assuming, of course, that that was what you
instantiated in the first place.)
> and how check what type of object (if i have few ListViewItem declared ?)
isinstance(item, MyListViewItem). Usage of isinstance() is frowned by
Python purists though, and they would probably suggest that your
different types of item objects all implemented e.g. an itemType()
method for figuring out what kind of item it is.
//Fredrik
_______________________________________________
PyKDE mailing list PyKDE@mats.gmd.de
http://mats.gmd.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