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 203 - QVariant.toList returning empty lists
: QVariant.toList returning empty lists
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtCore
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-03-30 04:13 EEST by Matti Airas
Modified: 2010-05-04 18:43 EEST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-03-30 04:13:32 EEST
As reported by joel__ (Joel B. Mohler) on the IRC:


# -*- coding: utf-8 -*-
from PySide import QtCore

def variant(*t):
    return QtCore.QVariant([QtCore.QVariant(i) for i in t])

qvar = variant((1,2,3))
print qvar.toList()
# qvar.toList used to return a list [1,2,3]  (I think!!!)



Furthermore, QVariant also accepts python lists but doesn't return anything:

qvar2=QtCore.QVariant([1,2,3])
print qvar2.toList()
Comment 1 Hugo Parente Lima 2010-04-07 09:29:50 EEST
Fixed in commit pyside-shiboken/9b338f98571bd2d0433564014af3cf18e87788bd