I think allowing access in the delegate to "not the current item" it would
be a plain hack around the Model/View pattern used here.
But there is something simple you could do.

Expose some "access method" of your model in the QML space.
Not the official "Model interface", but something you cook, specifically for
your purpose.

After that, access the model directly from the global space (expose it
attaching it to the QDeclarativeEngine).

Again, it's an hack, but if you need it.

On 12 May 2010 01:00, <[email protected]> wrote:

> Hi,
>
>
> On 12/05/10 2:56 AM, "ext Stephen Kelly" <[email protected]> wrote:
>
> > So much for model/view separation :)
> >
> > I'm not really trying to get the "context properties internal to the
> > delegate", I'm trying to get "context properties internal to the model".
> >
> > To do that it looks like I need to make sure the delegate has aliases for
> > any custom role I might want to use to retrieve data.
> >
> > What if I want to get the data in the n-th row of a c++ model, not just
> the
> > "current item"? Will that ever be possible?
>
> It might be possible in the future.  There are some memory management
> issues
> that would need to be worked out, but it could be done.  If you feel
> strongly about this, please create a "suggestion" in the bug system.
>
> For now, the best you can do is hacks :(
>
> Cheers,
>
> Aaron
>
>
> _______________________________________________
> Qt-qml mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>



-- 
Ivan De Marino | Software Engineer | France Telecom R&D UK - Orange Labs
w. +44 20 8849 5806 | m. +44 7515 955 861 | m. +44 7974 156 216
ivan[dot]demarino[at]orange-ftgroup.com |
ivan[dot]de[dot]marino[at]gmail[dot]com
www.detronizator.org | www.linkedin.com/in/ivandemarino
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to