I've followed the examples in the documentation. Both exactly with the User class and tried to create my own model. I am able to register and insert rows into the database using the code from the documentation. When I create a QDjangoQuerySet (both with and without filtering), I can see it is getting rows from the database - users.count() shows this. However, when I iterate over the users, using both for and foreach methods, the resulting objects are null. Am I missing a step?
I followed all instructions to configure and register the models. Like I said, I am able to do everything else through QDjango like delete all rows, create tables, and even selects return the count of rows I'm expecting. I am using Sqlite3 on Windows 8.1 and Qt 5.3.1
Example of what is happening
QDjangoQuerySet<User> users;
qDebug() << "Count of all users: " << users.count(); // prints the number of rows I'm expecting
foreach(const User& user, users){
qDebug() << "Found user: " << user.username() << ", "; // user is null, invoking username() crashes
}
Thanks