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

List:       pykde
Subject:    Re: [PyKDE] doubleClicked signal in QIconView (solved)
From:       Karsten =?iso-8859-1?q?K=FCnne?= <kuenne () rentec ! com>
Date:       2003-11-29 5:06:45
[Download RAW message or body]

Forget my previous posting, I found the solution. I just forgot a * (stupid 
me):

self.connect(self,SIGNAL("doubleClicked(QIconViewItem *)"),self.myfun)


That happens if you program until late in the night! Sorry for the noise.

On Friday 28 November 2003 23:38, Karsten Künne wrote:
> Hi,
>
> I have the following problem and I can't figure out how to solve it. I try
> to create a QIconView and I want to receive the doubleClicked() signal and
> check which icon was clicked but I always get an error if I try to connect
> it. Following is the program snippet:
>
> class myview(QIconView):
>     def __init__(self,parent = None,name = None,fl = 0):
>         QIconView.__init__(self,parent,name,fl)
>         QIconViewItem(self,"Icon 1",QPixmap("ok.png"))
>        
> self.connect(self,SIGNAL("doubleClicked(QIconViewItem)"),self.myfun)
>
>     def myfun(self,item):
>         print item
> ....
>
> If I try to run it I get the following:
>
> Traceback (most recent call last):
>   File "testing.py", line 18, in ?
>     w = myview()
>   File "testing.py", line 10, in __init__
>     self.connect(self,SIGNAL("doubleClicked(QIconViewItem)"),self.myfun)
> RuntimeError: Signal has wrong argument types for slot
>
>
> Now, how can I create a slot which has the right argument types for the
> signal? I'm relatively new to python so please forgive me if this is
> obvious. I can successfully connect signals which don't send any arguments
> but all signals which send a QIconViewItem don't work. This is on SuSE 9.0
> with PyQt 3.8.

-- 
Karsten.

'Nobody Expects the Spanish Inquisition'
    -Monty Python

_______________________________________________
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