C++ + QML + SQLite + ListView. Exporting Data
-
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 -
Hi and welcome to devnet,
I don't see where you set your database connection; read here
-
@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
-
@mcosta debug lines as u can see, loads 1380 items.
-
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.
-
@mcosta I tried , but nothing ..