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 434 - Unable to call Python functions from QML
: Unable to call Python functions from QML
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: QtDeclarative
: HEAD
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-10-26 09:52 EEST by Matti Airas
Modified: 2010-11-25 17:53 EET (History)
8 users (show)

See Also:


Attachments
Failing example application (924 bytes, application/x-gzip)
2010-10-26 09:52 EEST, Matti Airas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-10-26 09:52:31 EEST
Created attachment 126 [details]
Failing example application

I'm trying to call a Python function from QML by following this page:

http://doc.qt.nokia.com/4.7/qtbinding.html

The current code is attached. When I run picker.py and click the red rectangle,
I'd expect the text "red" to be printed on stdout. Instead, I get this:

file:///home/matairas/src/pyside/qml/pycell/picker.qml:25: TypeError: Result of
expression 'printer' [null] is not an object.
Comment 1 Matti Airas 2010-10-27 11:20:44 EEST
This was a user error: empty __init__ causes the QObject constructor not to be
called. Works when __init__ is commented out.
Comment 2 Hugo Parente Lima 2010-11-25 17:53:42 EET
Released on version 1.0.0~beta1