[PyKDE] can't connect signal...

Jim Bublitz jbublitz at nwinternet.com
Sun Feb 6 07:36:40 GMT 2005


On Saturday 05 February 2005 23:00, Christopher J. Bottaro wrote:
> I get a runtime exception when I try to execute the following code:
>
> ---
>
> def _initConnections(self):
>    QObject.connect(self.list_view,
>                    SIGNAL("contextMenuRequested(QListViewItem*, QPoint&,
> int)"),
>                    self.slotContextMenuRequested)
>
> def slotContextMenuRequested(self, item, pos, col):
>         print "slotContextMenuRequested()"
>
> ---
>
> RuntimeError: Signal has wrong argument types for slot
>
> If I change self.slotContextMenuRequested to
> MyClass.slotContextMenuRequested, i get a crash instead:
> KCrash: Application 'main.py' crashing...
>
> self is an instance of KMainWindow (actually an instance of a derived class
> of course).
>
> Any help is appreciated, thank you.

const QPoint&, not QPoint&

JIm




More information about the PyQt mailing list