@GrecKo said in passing lists of data to a Component:
What if you want to display a gauge/slider? How would you define the min/max value?
You're a mind reader - I will indeed need to do that elsewhere (the customer wants separate pages for viewing and editing the Equipment fields). I was starting with the easy (readonly) stuff.
I'm still having trouble putting this all together, though. I need a Flickable (or ListView) that will conditionally display properties of the Equipment object based on the category of the equipment.
Here's the basis of the Equipment class:
enum EquipmentCategory { CATEGORY_UNKNOWN, CATEGORY_VSP, CATEGORY_HEATER, CATEGORY_HEATPUMP, // ... } class Equipment : public QObject { Q_OBJECT QML_ELEMENT EquipmentCategory m_category = CATEGORY_UNKNOWN; // exposed to QML // ... }So, how do I use a DelegateChooser here:
Flickable { // what is my model? DelagateChooser { role: category DelegateChoice { role: CATEGORY_VSP // this doesn't seem right VspDelegate {} // contained an another file } DelegateChoice { role: CATEGORY_HEATER HeaterDelegate {} // contained an another file } } }Is this on the right track?
Thanks...