[PyKDE] Cannot connect QSplitter signal

Toru Furukawa toru at oldriver.org
Sat Jun 28 06:07:00 BST 2003


I want to make a QSplitter widget detect double-click event, but I 
cannot figure out how.

Platform: WindowsXP / Python2.2.2 / Qt2.3 / PyQt-3.6

I tried this code;
# sp.py
from qt import *
app = QApplication([])
s = QSplitter()
app.setMainWidget(s)
s.show()
app.connect(s, SIGNAL("childEvent(QChildEvent *e)"), PYSIGNAL("foo"))
app.exec_loop()

and I got the following error.

Traceback (most recent call last):
  File "sp.py", line 6, in ?
    app.connect(s, SIGNAL("childEvent(QChildEvent *e)"), PYSIGNAL("foo"))
RuntimeError: Signal has wrong argument types for slot

Then, I tried "labmda e: 0" instead of PYSIGNAL("foo"), and I got the 
same error.  What is wrong with my code?

-- 
Toru Furukawa <toru at oldriver.org>




More information about the PyQt mailing list