Thanks a lot! So I'm trying to store a pointer to ListModel and ConfigurationValue drops this silently because it's an invalid value, doesn't it?
What is the standard way in Sailfish to access DConf from C++? I think about reimplementing the model as a subclass of QAbstractListModel anyway. Marcin On 01.11.2016 20:46, Andrey Kozhevnikov wrote: > you storing pointer to model, not model contents :) > to store model data you should recursively convert model data to > array, and vise versa. > > ------ Исходное сообщение ------ > От: "Marcin Mielniczuk" <marmistrz...@gmail.com> > Кому: "Sailfish OS Developers" <devel@lists.sailfishos.org> > Отправлено: 01.11.2016 22:32:57 > Тема: [SailfishDevel] Persistently storing a ListModel > >> Hi, >> >> I'm currently using org.nemomobile.configuration to store the >> application settings. Now it came out it'd be beneficial to store a >> ListModel between runs (if a user wants it). >> >> I tried the naive approach: >> >> property ListModel myModel: modelStorage.value >> >> ConfigurationValue { >> id: modelStorage >> key: Constants.modelStorageKey >> defaultValue: ListModel {} >> } >> >> But no dconf key seems to be generated after I populate the model. >> >> What is my best bet in this case? Is this the expected behavior or have >> I done something wrong on my side? >> >> -- >> Marcin >> >> >> _______________________________________________ >> SailfishOS.org Devel mailing list >> To unsubscribe, please send a mail to >> devel-unsubscr...@lists.sailfishos.org > > _______________________________________________ > SailfishOS.org Devel mailing list > To unsubscribe, please send a mail to > devel-unsubscr...@lists.sailfishos.org _______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org