/srv/irclogs.ubuntu.com/2017/03/20/#ubuntu-app-devel.txt

kalikiana_TheReaperKing1: I'd recommend to use the snap store for any new software.08:33
dakerkalikiana_: hi, do you have a simple working example to create a model with two prop from sqlite entries using c++ ?11:42
=== _salem is now known as salem_
kalikiana_daker: Using the QSqlDatabase API? Or U1DB? Can you perhaps give me some more details?13:15
dakerkalikiana_: using QSqlDatabase13:16
dakeri already i have the sql part, i just need how to create the model using c++13:17
kalikiana_daker: QSqlDatabase db(QSqlDatabase::addDatabase("QSQLITE", "mydb")); if (db.isValid()) { db.setDatabaseName("mydb.db");if (db.open()) { ... } }13:20
kalikiana_You'll want to check db.lastError() in the else paths13:20
kalikiana_for the actual query: QSqlQuery query(db.exec()); query.prepare("SELECT FOO FROM BAR BLABLA"); if (query.exec()) { ... } else db.lastError()13:22
=== JanC is now known as Guest30327
=== JanC_ is now known as JanC
dakerkalikiana_: i mean i already have this setup, I queried the records, i need to create a qml model with, insert objects of those records and make the model available in qml13:30
kalikiana_daker: In that case sql has nothing to do with it, you'll want to learn how qml models work13:32
kalikiana_Lemme see what's a good example13:32
dakerkalikiana_: a working example would really help, thanks!13:33
kalikiana_daker: Perhaps src/UbuntuToolkit/sortfiltermodel.cpp it's a really slim wrapper around an existing model that doesn't support C++13:33
kalikiana_in lp:ubuntu-ui-toolkit/staging13:34
dakerkalikiana_: ok i'll check it13:35
kalikiana_daker: Most importantly get and roleNames. The count() method is optional but usually nice to have in QML13:36
=== JanC_ is now known as JanC
TheReaperKing1Thank you kalikiana_  It is has been on there a few years now, is the snap store still applicable for it? I'll have to look into it15:29
TheReaperKing1ohh that seems super interesting15:30
TheReaperKing1I'd love to just even edit the description in the app store to lead people to the working file15:30
kalikiana_TheReaperKing1: it's much simpler indeed. and no review required (for most apps)15:58
TheReaperKing1Do you know if there is a way I can change the description in the app store?16:00
TheReaperKing1I've sent messages to the guy who posted it for us but I haven't gotten a response16:00
TheReaperKing1I hate having something posted so publicly that isn't working properly16:00
kalikiana_I can't really help much with the old one I'm afraid16:10
kalikiana_Of course the low-tech solution is to just post a comment/review with the new details16:11
=== diddledan_ is now known as diddledan
TheReaperKing1I haven't figured out how to comment, I did try though22:11
TheReaperKing1if I do it from the ubuntu app store it times out22:11
TheReaperKing1aka the login prompt that pops up times out22:12
TheReaperKing1I didn't see a way to do it from the webpage22:13
TheReaperKing1and thank you for your help with all of this22:13

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!