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 716 - QPersistentModelIndex isn't convertible to QModelIndex
: QPersistentModelIndex isn't convertible to QModelIndex
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: 1.0.0
: All All
: P3 normal
Assigned To: Marcelo Lira
:
:
:
  Show dependency treegraph
 
Reported: 2011-03-10 21:18 EET by Hugo Parente Lima
Modified: 2011-05-26 17:04 EEST (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 Hugo Parente Lima 2011-03-10 21:18:20 EET
QPersistentModelIndex isn't convertible to QModelIndex, so you can't use
QPersistentModelIndex as you do in C++, in other words, it's complatly useless
on PySide.

test case:


from PySide.QtGui import *
from PySide.QtCore import *
m = QStringListModel(["um", "dois", "tres"])
idx = m.index(1, 0)
p = QPersistentModelIndex(idx)
m.data(p, Qt.DisplayRole)


TypeError: 'PySide.QtGui.QStringListModel.data' called with wrong argument
types:
  PySide.QtGui.QStringListModel.data(PySide.QtCore.QPersistentModelIndex,
PySide.QtCore.Qt.ItemDataRole)
Supported signatures:
  PySide.QtGui.QStringListModel.data(PySide.QtCore.QModelIndex, int)
Comment 1 Marcelo Lira 2011-05-13 23:33:00 EEST
Fixed in commits:
ApiExtractor/eeb6d449
Shiboken/b1d8ab35
PySide/5ae1e646
Comment 2 renato filho 2011-05-26 17:04:08 EEST
PySide release 1.0.3