Hi,<div><br></div><div>I am getting the following error message and just can not figure out what is happening to cause it:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
Unexpected error: (<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x019BE490>)<br></blockquote><div><br></div><div>I have narrowed it down to at least one action...QTreeWidget.clear() and only <span class="Apple-style-span" style="font-style: italic;">after </span>I have used the tree to drag/drop widgets into another tree. If I perform a clear() action on a freshly populated tree then I don't get the error. However after the drag/drop is performed then somehow the indexes get screwed up. </div>
<div><br></div><div>I also tried to clear out the tree by popping all the TreeWidgetItems ou<span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif;">t using </span><a href="http://doc.trolltech.com/4.3/qtreewidget.html#takeTopLevelItem" style="text-decoration: none; "><span class="Apple-style-span" style="color: rgb(0, 0, 0);"><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">takeTopLevelItem</span></span></span></a><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">(). I grabbed the TopLevelItem count and went through a loop grabbing them all. I got the same error on the last loop. However I'm positive I didn't go through the loop an extra time. If I had 2 top level items I made sure it only looped twice. </span></span></div>
<div><br></div><div>It's causing a problem once I package the application for deployment because once the app is closed it always throws up the message that an error has occurred, check the logs. So I tried to figure out a way to catch the exception, but I couldn't catch that one using Python try/except. I also couldn't find a way to turn it off. Anybody have an idea what's going on here?</div>
<div><br></div><div>Thanks,</div><div>Marc</div>