[PyKDE] can't connect signal...

Christopher J. Bottaro cjbottaro at alumni.cs.utexas.edu
Sun Feb 6 07:00:39 GMT 2005


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.




More information about the PyQt mailing list