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. The ListView will always only show one of those screens. Still the other screens exist and get updated all the time. This is of course unnecessary. In this situation I'm currently using the 'isCurrentItem' of the ListView. But it makes my QML code ugly because everywhere I have things like: Text { text: ListView.isCurrentItem ? backend.someText : "" } What is everyone doing in those situations? Thanks! Conny _______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml _______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml
