Well after taking a long hiatus I have decided to pick up Qt again and check out the new Qt quick!
I am trying to use the Qt quick components to make a conversion component for an app I am working on. Here is an example of the approach I am trying to take:
Obviously these are 2 separate controls working independently. Can anyone steer me in the right direction on the best practice to dynamically load the second SelectionListItem with the appropriate list model for the item selected from the first component?Code:import QtQuick 1.0 import com.nokia.symbian 1.0 import Qt.labs.components 1.0 Rectangle { id: window width: 300 height: 300 color: "silver"; radius: 10 anchors.fill: parent Column{ id: box anchors.fill: parent spacing: 5 SelectionListItem { id: conversionTpe title: "Conversion Type"; subTitle: selectionDialog.selectedIndex >= 0 ? selectionDialog.model.get(selectionDialog.selectedIndex).name : "Please select" onClicked: selectionDialog.open(); SelectionDialog { id:selectionDialog titleText: "Type of conversion?"; selectedIndex: -1 model: ListModel { ListElement {name: "Temperature"} ListElement {name: "Distance"} ListElement {name: "Angles"} ListElement {name: "Area"} ListElement {name: "Volume"} } } } SelectionListItem { id: from subTitle: from1.selectedIndex >= 0 ? from1.model.get(from1.selectedIndex).name : "Please select" onClicked: from1.open(); SelectionDialog { id:from1 titleText: "Convert from?"; selectedIndex: -1 model: ListModel { //this list needs to be loaded based on the input of conversionTpe ListElement {name: "Celcius"} ListElement {name: "Farenheit"} ListElement {name: "Kelvin"} } } } } }
There must be a way to have numerous list models that can be loaded into the SelectionListItem dynamically when needed? Like a standard Qt ComboBox widget.
It seems like this should be quite simple, I must have a mental block...Among other things...
I have looked through the documentation carefully as well as looked for examples and have come up with nothing that helped...
Any help is appreciated!
Cheers,
Jon

Among other things... 


