Hi Eduardo - a huge thanks to you for your detailed and clear explanation. An excellent tutorial to a programming novice.
Paul Isaacs Principal Applications Engineer Sound Devices LLC www.sounddevices.com On 5/11/10 3:29 PM, Eduardo Fleury wrote: > Hi there. > > On Tue, May 11, 2010 at 11:37 AM, Paul Isaacs > <[email protected] <mailto:[email protected]>> > wrote: > > I am using a main List View to list/switch between 3 separate pages. > > Each page is defined by its own .qml file. > > Ok that's fine. > > > Each loaded page defines a mouse area in order to return back to the > > main List View. > > The idea is OK but there is an issue with the implementation. > > So you have: > > *1) The main screen (MainList.qml)* with: > A. some stuff on it, including a list and some text. > B. a Loader, to show secondary screens > > Then when you choose an option, B is filled with: > > *2) A secondary screen (List1.qml)* > A. some stuff on it, including a text > B. a button to go back > C. a _Loader_ > > Ok, the problem here is with 2.C. In this case you don't want to open > another instance of MainList inside your secondary list... In fact you > want to hide List1 so that the _original_ MainList can be seen again, > isn't it? > > With the original implementation you were creating several layers of > Loaders... MainList on top of List1 on top of MainList on top of List1 > on top of MainList, and so on... > > "So, probably memory will be exhausted sometime, right?" > > Yes... but there is another problem... > > If the_* original instance of MainList is still there, hidden bellow > the onion of layers, it means it is still grabbing keyboard arrow > events.*_ That means the second instance of MainList, which is created > when we go back from List1, won't get any events.. > > If you change "visible = false" to "opacity = 0.5" or something like > that you will be able to see thru the problem... > > Attached is a new version of your code that works fine. I've > documented all my changes inline and recommend you start reading from > List1.qml. > > Let me know if anything is unclear. > > Best regards, > -- > Eduardo M. Fleury > OpenBossa - INdT > http://eduardofleury.com/ > http://www.openbossa.org/ > > > _______________________________________________ > Qt-qml mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-qml > _______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
