[Qt-interest] ModelView not updating

Eric Clark eclark at ara.com
Tue Oct 6 18:44:25 CEST 2009


I figured it out. Thanks.

From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Eric Clark
Sent: Tuesday, October 06, 2009 11:03 AM
To: Qt Interest (qt-interest at trolltech.com)
Subject: [Qt-interest] ModelView not updating

Hello All,

I currently have an AbstractModel that represents a tree of items. I have created an AbstractTreeItem class very similar to the TreeWidgetItem class except that it has some extra functionality. At any rate, I am having an issue where I create the items and they do not cause the View to update in Debug mode. However, in Release mode everything works the way it should. I am adding child items to items that already exist in the view. The items are added by a user right-clicking on an item in the view, then my response to the mouse event goes through and creates the items that are not there. In release mode, the view updates and I see all of my new items, but in debug, nothing happens. The view does not update, the items do not show that they have child items, and I KNOW that the items are created because I have already debugged it. The items are created and BeginInsertRows and EndInsertRows are being invoked properly. I even tried to reset the view, but, still, nothing happens. The only way I can get the items to show up is to close the dialog and reopen it with the items already there. Again, I would like to point out that this behavior only happens in debug mode, everything seems to work fine in release.

Has anyone experienced any similar behavior? Or does anyone have any ideas as to what might be going on? I am on the latest release, 4.5.3.

Thank You!
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091006/7740dbb3/attachment.html 


More information about the Qt-interest-old mailing list