1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# -*- coding: utf-8 -*- import unittest from PySide.QtCore import * class MyModel (QAbstractListModel): pass class Foo: pass class TestQModelIndexInternalPointer(unittest.TestCase): def testInternalPointer(self): m = MyModel() foo = Foo() idx = m.createIndex(0,0, foo) if __name__ == '__main__': unittest.main()