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 461 - QList<QObject*> export as QVariantList to QML
: QList<QObject*> export as QVariantList to QML
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-11-08 20:38 EET by renato filho
Modified: 2010-11-25 17:48 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description renato filho 2010-11-08 20:38:30 EET
Using QDeclarativeContext.setContextProperty to the a property passing a
QList<QObject*>, this value is converted to QVariantList instead of a QVariant
with a list of QObjects inside.

This is necessary to keep the compatibility with C++ code.
Comment 1 renato filho 2010-11-08 21:33:40 EET
In current PySide implementation all python lists are converted to QVariantList
when a list is transfered to C++.

But this cause a wrong behavior in some functions like:
QDeclarativeContext.setContextProperty.

QtDeclarative module register a new metaType "QList<QOBject*>", with this all
objects list are convertible to QVariant and not to QVariantList.

This need be fixed on current PySide QVariant conversion, PySide need be able
to convert any metaType registered by user to QVariant type.
Comment 2 renato filho 2010-11-09 16:01:28 EET
fixed on pyside commit:
commit 90bdf74053b18d92df0eed142fef39ce8a15d6b4
Author: renatofilho <renato.filho@openbossa.org>
Date:   Tue Nov 9 13:59:05 2010 -0300
Comment 3 renato filho 2010-11-25 17:48:22 EET
released on 1.0.0~beta1