kalikiana_ | TheReaperKing1: I'd recommend to use the snap store for any new software. | 08:33 |
---|---|---|
daker | kalikiana_: 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 |
daker | kalikiana_: using QSqlDatabase | 13:16 |
daker | i 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 paths | 13: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 | ||
daker | kalikiana_: 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 qml | 13:30 |
kalikiana_ | daker: In that case sql has nothing to do with it, you'll want to learn how qml models work | 13:32 |
kalikiana_ | Lemme see what's a good example | 13:32 |
daker | kalikiana_: 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/staging | 13:34 |
daker | kalikiana_: ok i'll check it | 13:35 |
kalikiana_ | daker: Most importantly get and roleNames. The count() method is optional but usually nice to have in QML | 13:36 |
=== JanC_ is now known as JanC | ||
TheReaperKing1 | Thank 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 it | 15:29 |
TheReaperKing1 | ohh that seems super interesting | 15:30 |
TheReaperKing1 | I'd love to just even edit the description in the app store to lead people to the working file | 15:30 |
kalikiana_ | TheReaperKing1: it's much simpler indeed. and no review required (for most apps) | 15:58 |
TheReaperKing1 | Do you know if there is a way I can change the description in the app store? | 16:00 |
TheReaperKing1 | I've sent messages to the guy who posted it for us but I haven't gotten a response | 16:00 |
TheReaperKing1 | I hate having something posted so publicly that isn't working properly | 16:00 |
kalikiana_ | I can't really help much with the old one I'm afraid | 16:10 |
kalikiana_ | Of course the low-tech solution is to just post a comment/review with the new details | 16:11 |
=== diddledan_ is now known as diddledan | ||
TheReaperKing1 | I haven't figured out how to comment, I did try though | 22:11 |
TheReaperKing1 | if I do it from the ubuntu app store it times out | 22:11 |
TheReaperKing1 | aka the login prompt that pops up times out | 22:12 |
TheReaperKing1 | I didn't see a way to do it from the webpage | 22:13 |
TheReaperKing1 | and thank you for your help with all of this | 22:13 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!