Hi all,
I have an app with 8 buttons for controlling lights and plugs. Of the 8 items, 2 are plugs. I would like to rename the plug when required and the new name to stick.
Example: PLUG1 is statically named ‘FAN’, but the ‘FAN’ broke and now I have my ‘BIKE’ charger plugged into it, so I would like to rename the button to ‘BIKE’ ~ I have already worked out how to change the name using TextField, but when the app is closed and opened again, the plug name has defaulted back to ‘FAN’ (clearly this is expected, the app does not know about the renaming of the indexed button).
I was shown how to serialise/deserialise data using QtCreator for Windows for a desktop application, but the same code does not apply/or work with SailfishOS. I cannot seem to adapt it, at all.
I know I have to use ConfigurationGroup (or possibly ConfigurationValue), which is fine for a single Item, this I know how to do, but not for multiple items in an Array.
So, my question is this; how do I serialise/deserialise my button names with SFOS.
My item ARRAY;
Item {
id: tasmota
property var switchName: ["POWER", "FAN", "DESK", "BED", "PATIO", "OFFICE", "KITCHEN", "CLOSET"]
}
}