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 478 - Unable to create NOTIFYable properties in QObject Python subclasses
: Unable to create NOTIFYable properties in QObject Python subclasses
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtCore
: 0.4.2
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-11-20 15:14 EET by Thomas Perl
Modified: 2010-11-25 17:48 EET (History)
8 users (show)

See Also:


Attachments
Example project tarball (both C++ and equivalent Python code) (1.50 KB, application/x-gzip)
2010-11-20 15:14 EET, Thomas Perl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Perl 2010-11-20 15:14:33 EET
Created attachment 146 [details]
Example project tarball (both C++ and equivalent Python code)

I'm not able to create a property for a QObject subclass that is NOTIFYable
(using the "notify" keyword of the Property function). I've followed these two
Wiki pages to create my QObject subclass with properties and signals:

http://developer.qt.nokia.com/wiki/Using_Qt_Properties_in_PySide
http://developer.qt.nokia.com/wiki/Signals_and_Slots_in_PySide

The error I'm getting is this:

QMetaProperty::read: Unable to handle unregistered datatype '' for property
'MyObject::value'
QDeclarativeExpression: Expression "(function() { return myobj.value })"
depends on non-NOTIFYable properties: 
    MyObject::value


I'm attaching an example project in both C++ and Python that demonstrates the
problem (the C++ code works perfectly, and the Python translation of it does
not work and gives the above error).

I'm using version 0.4.2-0pyside1 on Ubuntu Maverick from the PySide PPA.

Here are some additional instructions for the attached example project:

Starting the C++ app
====================

    qmake
    make
    ./qml-properties

Starting the Python app
=======================

    python qml-properties.py
Comment 1 renato filho 2010-11-22 10:45:16 EET
fixed on commit:

commit e12197e2822a8cca0022d0843057548246930c16
Author: Renato Araujo Oliveira Filho <renato.filho@openbossa.org>
Date:   Sun Nov 21 18:08:46 2010 -0300
Comment 2 renato filho 2010-11-25 17:48:25 EET
released on 1.0.0~beta1