Phil,
when running the following code
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import PyQt4.Qt as Qt
class MyWidget(Qt.QWidget):
def __init__(self, parent=None):
super(Qt.QWidget, self).__init__(parent)
# __init__()
# class MyWidget
def bar(widget):
pass
# bar()
def foo(widget):
print type(widget)
# BUG? For me widget is a Python type, but not for widget.connect().
widget.connect(widget, Qt.SIGNAL('item_changed(widget)'), bar)
# foo()
if __name__ == '__main__':
application = Qt.QApplication([])
widget = MyWidget()
foo(widget)
# Local Variables: ***
# mode: python ***
# End: ***
I get this traceback:
<class '__main__.MyWidget'>
Traceback (most recent call last):
File "bug.py", line 31, in <module>
foo(widget)
File "bug.py", line 23, in foo
widget.connect(widget, Qt.SIGNAL('item_changed(widget)'), bar)
TypeError: C++ type 'widget' is not supported as a slot argument type
but isn't widget a Python type? (although derived from a C++ type)
Best regards -- Gerard
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt