[SailfishDevel] Technical question: populating ListModel from C++

Jarko Vihriala jarko.vihriala at jolla.com
Fri May 23 06:38:39 UTC 2014


Hi!

Either that or use the QSqlQueryModel in your c++ and expose that to QML ; just like in :
http://qt-project.org/wiki/How_to_use_a_QSqlQueryModel_in_QML

thanks, Jarko

________________________________
From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of Kimmo Lindholm [Kimmo.Lindholm at eke.fi]
Sent: Friday, May 23, 2014 9:17 AM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] Technical question: populating ListModel from C++

Hi All,

What would be the best method to populate ListModel in QML from the C++ side?

I have sqlite database, which contents I would like to put on ListView.

List is changed only by user when deleting or adding entry, upon this action I would like to update sqlite and then refresh listmodel.

-kimmo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140523/ea8418fc/attachment-0001.html>


More information about the Devel mailing list