PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 715 - Can't connect to signals with arguments when connecting through constructor
: Can't connect to signals with arguments when connecting through constructor
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtCore
: HEAD
: PC Linux
: P3 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-03-09 19:44 EET by Lauro Moura
Modified: 2011-04-29 18:06 EEST (History)
8 users (show)

See Also:


Attachments
Example (188 bytes, text/x-python)
2011-03-09 19:44 EET, Lauro Moura
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2011-03-09 19:44:12 EET
Created attachment 282 [details]
Example

PySide supports connecting signals by providing a keyword argument where the
name is the signal name and the argument itself is the callback object.

Currently there is a problem using this scheme to connect to signals that
expect arguments:

$ python-dbg test.py 
Traceback (most recent call last):
  File "test.py", line 10, in <module>
    obj = QSpinBox(valueChanged=callback)
AttributeError: 'valueChanged()' is not a Qt property or a signal

Example attached.
Comment 1 Lauro Moura 2011-03-09 20:12:17 EET
Added simple testcase for PySide in [1].

[1]
http://qt.gitorious.org/~lauromoura/pyside/lauro-pyside/commit/340fb6b31083fb2ee845db29bc9406e34d66135b
Comment 2 Hugo Parente Lima 2011-03-10 15:47:00 EET
P3 as it isn't a crash and there are many possible workarounds.
Comment 3 renato filho 2011-04-15 00:18:31 EEST
this is the expected behavior for connection through constructor named
arguments. This is only valid for slots/signals without arguments.
Comment 4 renato filho 2011-04-29 18:06:05 EEST
PySide release 1.0.2