Re: [SailfishDevel] Technical question: populating ListModel from C++
Hi, I suggest you implement the model yourself by subclassing QAbstractItemModel. See http://qt-project.org/doc/qt-5/qtquick-modelviewsdata-cppmodels.html and http://qt-project.org/doc/qt-5/qabstractitemmodel.html to get started. -- Janne 2014-05-23 9:17 GMT+03:00 Kimmo Lindholm : > Hi All, > > > > What would be the best method to populate ListModel in QML from the C++ > side? > > > > I have sqlite database, which contents I would like to put on ListView. > > > > List is changed only by user when deleting or adding entry, upon this action > I would like to update sqlite and then refresh listmodel. > > > > -kimmo > > > ___ > SailfishOS.org Devel mailing list > To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org ___ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
Re: [SailfishDevel] Sideload Native App To Sailfish
And infact you don't even need Filemanager for that: 1) download an RPM using Jolla Browser 2) Open Jolla Store and keep it open in background 3) Go to Settings -> Transfers 4) Click the downloaded rpm file (nothing seems to happen) 5) Switch to Jolla Store and click "Install" This method also works also without developer mode. -- Janne 2014-02-05 A. Wickert : > You don't need the developermode to install RPMs. You can install RPMs > easily from the FileManager. > ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Problem with QQmlListProperty
Remove "static" keyword and put correct scope for the methods in cpp file: 2013/12/29 Markus Svensson : > Hi guys, ... > static void append(QQmlListProperty *property, Note* value) { > > NoteList *list = (NoteList*) property; > > list->addNote(value); > > } => void NoteList::append(QQmlListProperty *property, Note* value) { NoteList *list = (NoteList*) property; list->addNote(value); } Keep the "static" keyword in h file though. -- Janne ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] (QtLocation 5.0) Coordinate is not a type
Hi, >> I try to use it without any key it says to go to > https://api.developer.nokia.com but that URL just >> redirects to the main Nokia Developer page. I can't find the right place > to register... Sign in here: https://developer.here.com/myapps You need to have a Nokia developer account. If you don't have one, click on the "register" button on the sign in dialog. Once you have a Nokia account, click "Create app" and follow the instructions in the wizard. > - We have to install QtLocation/QtPositioning in the SDK > - We have to manually install them in the emulator (I just found out about > pkcon and zypper) To my knowledge you don't need to do any manual installation, just configure yaml-file correctly, and use the option "Deploy as rpm package" when running your app in the emulator: PkgBR: [qt5-qtlocation-devel, qt5-qtdeclarative-import-location, qt5-qtpositioning-devel, qt5-qtdeclarative-import-positioning] Requires: - qt5-plugin-geoservices-nokia - qt5-qtdeclarative-import-location - qt5-qtdeclarative-import-positioning More instructions in this very useful blog post I found: http://flyingsheeponsailfish.blogspot.fi/2013/11/deploying-additional-packages-to.html > But now, if I try to display the simplest Map, I just get a blank screen. I > have a message telling me that there is an error with the Plugin I use (does > not support something - sorry I don't have the precise error message here) Are you sure you have provided valid app_id and token parameters to the plugin? Map plugin might give misleading error messages if you supply invalid ones. See: https://bugreports.qt-project.org/browse/QTBUG-26634 This was the case with my app. I was getting this: "QML MapComponent: Error: Plugin does not support mapping." With correct parameters the error message disappeared. > Or do you see what I am missing? For the plugin, I just put the same than > for Harmattan: > plugin : Plugin { > name : "nokia"; > parameters: [ > PluginParameter { name: "app_id"; value: "APPID" > }, > PluginParameter { name: "token"; value: "TOKEN" > } >] > } Looks correct to me, just make sure you provide valid values for the parameters. -- Janne ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] A new Jolla phone user - after 2 days of use
> Sailfish/Platform specific: > 1. From Lock Screen, swiping-up should bring me to Home screen, but it often > brings up the Events screen even if there is no notifications/events. Events screen appears only if you start the gesture from below the screen. If you want Home screen, start inside the screen area. > Jolla Store: > 1. Jolla App store feels a bit confusing - dont really know what apps are > there as the only clear "catalog" available is the list of apps built by > Jolla - all other Apps are scattered If you swipe left you get the Categories view that contains all the apps listed in specific categories. It took me also some time before I noticed it :) -- Janne ___ SailfishOS.org Devel mailing list