C++ + QML + SQLite + ListView. Exporting Data
-
wrote on 10 May 2015, 03:27 last edited by
Hi, I'm trying to export data from SQLite to a ListView , the result is an empty ListView without errors in Qt Creator.
C++ | QML | I'm following this example -
wrote on 10 May 2015, 15:22 last edited by fr0st- 5 Oct 2015, 15:52
@mcosta My connection is made in the class constructor Database and working as it should, the problem is that the data from the database does not fill the ListView
connection -
Can you add some debug line in
Database::getAll()
in order to verify the data are loaded?BTW, if you read here you'll find a different approach to create a ObjectList model
wrote on 10 May 2015, 16:51 last edited by@mcosta debug lines as u can see, loads 1380 items.
-
wrote on 10 May 2015, 17:02 last edited by mcosta 5 Oct 2015, 17:05
Hi,
in the link I posted the delegate uses this syntax
model.modelData.<field_name>
to access model dataSorry, At the moment I can try the code.
-
Hi,
in the link I posted the delegate uses this syntax
model.modelData.<field_name>
to access model dataSorry, At the moment I can try the code.
1/7