On Thu, 17 Mar 2011 02:14:15 ext [email protected] wrote:
> We set the model to the listview on visibility. That works fine.
> Sent on my BlackBerry® from Vodafone
> 
> -----Original Message-----
> From: Cornelius Hald <[email protected]>
> Sender: [email protected]
> Date: Wed, 16 Mar 2011 16:13:40
> To: Girish Ramakrishnan<[email protected]>
> Cc: <[email protected]>
> Subject: Re: [Qt-qml] Howto disable a QML Item?
> 
> Hi Girish,
> 
> On Wed, 2011-03-16 at 20:25 +0530, Girish Ramakrishnan wrote:
> > Maybe you can just set/unset the ListView's model?
> 
> thank you for this tip. In the scenario that I mentioned it actually
> works nicely :)
> 
> Still, a more general solution we be great. Because I'm having this
> problem at several places. For example, I'm using a couple of 'screens'
> in a ListView. Each screen is connected to the backend and updates
> itself if something changes in the backend.

Another approach that might be more general but hard to apply to your 
situation is to use the Connections element for the signal connections. You 
can set the target to null when the item is not visible, and then back to the 
intended target when the item is visible. This may not work for the automatic 
connections set up by models though.

--
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to