[SailfishDevel] Sailfish - refresh listView on previous page, combobox how to

Michael Faro-Tusino mfaro-tusino at live.com
Wed Oct 2 13:29:34 UTC 2013


Hi,

Not sure of your implementation, but why boy create a button that triggers a custom signal say refresh() and onRefresh{} you make the list view populate again. Obviously this will populate everything and not only what is new, but it will work.

When you get to extensive lists, this won't be ideal for the sake of optimization but depending on your implementation, it shouldn't be too hard to get done, and will be satisfactory.

-Michael

Sent from my Windows Phone
________________________________
From: Bartosz Remisz<mailto:bartrem737 at student.polsl.pl>
Sent: ‎2/‎10/‎2013 11:06 PM
To: devel at lists.sailfishos.org<mailto:devel at lists.sailfishos.org>
Subject: [SailfishDevel] Sailfish - refresh listView on previous page, combobox how to

Hello,

I am trying to make small app for Sailfish, but I encountered some issues. Please notice I am completely new in QT and Sailfish project, on the other hand, I work with Android, Windows Phone and iOS.

Firstly, there are two pages. On first there is SilicaListView, on second some other controls that let add new item to list. Data for list are stored in C++ code. I have problem with refreshing list when poping back. Is there any method similiar to notifyDataSetChanged in Android or reload in iOS, that can be invoked? I know there are signals but I wish rather not to use them in current implementation – only refresh from qml after pressing button (if possible).

On the second page I have put combobox, but I have no idea how to make it working with my data. Suppose there are C++ methods that returns items count and string to display for each of them. I thought it would work similar to listView (model, delegate Item), however it is not. Could you please give me some advice where to find more information about how to work with non static items for combobox? Any help would be greatly appreciated.

I have also noticed that when I put IconButton inside Column and set height, next item doesn’t appear below, but in somewhere in the middle of IconButton. Is there a need to set y value for next item or is it a bug?



Thanks in advance,
Bartek.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131002/cab1c5b1/attachment.html>
-------------- next part --------------
_______________________________________________
SailfishOS.org Devel mailing list


More information about the Devel mailing list