qt-interest@trolltech.com
[Top] [All Lists]

Re: Model/View (qt4 )

Subject: Re: Model/View qt4
From: Martin Gebert
Date: Mon, 20 Mar 2006 15:44:28 +0100
Marian Popeanga schrieb:

    The index metod is not called for items that are not already created :)

Wrong. index() is called when the view needs to get the data of an entry (display text, row count etc.); the resulting QModelIndex is used as a token, passed between model, view and delegate to represent that specific entry. So, in some sense (regarding the model-view-interconnection) the view item is created at the time index() is first called for it. It's up to you to instantiate/query the data connected to that index/item.

Martin

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>