On Tue, Mar 10, 2009 at 5:28 PM, Darren Dale <dsdal...@gmail.com> wrote:
> Hello, > > I am trying to create a simple model and view for a simple nested > dictionary like d: > > c1 = {'id':1, 'description':'child 1'} > c2 = {'id':2, 'description':'child 2'} > d = {'id':0, 'description':'whatever', 'children':[c1, c2]} > > I have a self-contained, relatively simple script attached. When I run it > and try to open the top-level entry by clicking on the +, I get errors like: > > Traceback (most recent call last): > File "tree_test.py", line 111, in parent > parent = index.internalPointer().parent > AttributeError: 'ItemDataRole' object has no attribute 'parent' > Traceback (most recent call last): > File "tree_test.py", line 111, in parent > parent = index.internalPointer().parent > AttributeError: parent > > Traceback (most recent call last): > File "tree_test.py", line 111, in parent > parent = index.internalPointer().parent > AttributeError: 'exceptions.AttributeError' object has no attribute > 'parent' > Bus error > > sometimes I get a different error: > > Traceback (most recent call last): > File "tree_test.py", line 111, in parent > parent = index.internalPointer().parent > AttributeError: 'ItemDataRole' object has no attribute 'parent' > Segmentation fault > > > Could anyone please help me understand what is happening? I dont understand > why index.internalPointer() is returning an ItemDataRole object or an > exceptions.AttributeError object. > > Im running Qt-4.5.0, sip-4.7.9 and PyQt-4.4.4. I just checked this script on a 64-bit kubuntu intrepid system with qt-4.4.3 and PyQt4-4.4.4, sip-4.7.9 and python-2.5.2 and I get segfaults here too. I guess that rules out some issue specific to qt-4.5. Darren
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt