[SailfishDevel] Carousel of Pages

Андрей Кожевников coderusinbox at gmail.com
Sat Dec 5 05:13:06 UTC 2015


SailfishView is based in PathView, so read
http://doc.qt.io/qt-5/qml-qtquick-pathview.html
You can define delegate as Loader and depends on slideshowview currentIndex
change loader sourceComponent.
05 дек. 2015 г. 6:09 пользователь "yurumi" <yurumi at gmx.de> написал:

> Thanks Andrey and Lucien! Although in my case it feels strange to have a
> SlideshowView that shows delegates which contain ListViews that show
> delegates, the proposed solution works.
>
> I have a follow up question: In case the components included in the
> SlideshowView are completely different, how can I "dynamically" choose
> the appropriate delegate (assuming every delegate has it's own qml file)?
>
> SlideshowView{
>     ...
>     model: ListModel {
>         id: articleCategoryModel
>         ListElement { articleCategory: "unread" }
>         ListElement { articleCategory: "favorite" }
>         ListElement { articleCategory: "archived" }
>     }
>
>     delegate: {// Choose delegate dependent on articleCategory //}
>     ...
> }
>
> Cheers,
> Thomas
>
>
> On 01.12.2015 09:51, Lucien Xu wrote:
> > Or SlideshowView
> >
> https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-slideshowview.html/
> >
> > It is built on top of PathView, but is easier to use
> >
> > ----- Mail original -----
> >> De: "Andrey Kozhevnikov" <coderusinbox at gmail.com>
> >> À: "Sailfish OS Developers" <devel at lists.sailfishos.org>
> >> Envoyé: Mardi 1 Décembre 2015 00:55:04
> >> Objet: Re: [SailfishDevel] Carousel of Pages
> >>
> >> PathView?
> >>
> >> ------ Исходное сообщение ------
> >> От: "yurumi" <yurumi at gmx.de>
> >> Кому: "Sailfish OS Developers" <devel at lists.sailfishos.org>
> >> Отправлено: 01.12.2015 2:59:26
> >> Тема: [SailfishDevel] Carousel of Pages
> >>
> >>> Hi everyone,
> >>>
> >>> for my application (sailabag) I would like to achieve a carousel
> >>> effect:
> >>> There are three Pages (unread articles, archived articles and
> >>> favorites). The user should swipe left / right to switch between the
> >>> categories, maybe in an endless loop.
> >>>
> >>> I couldn't find something appropriate in the Silica Reference
> >>> (pageStack.pushAttached was the closest hit). Has anyone a smart
> >>> solution for this kind of effect?
> >>>
> >>> Cheers,
> >>> Thomas
> >>> _______________________________________________
> >>> SailfishOS.org Devel mailing list
> >>> To unsubscribe, please send a mail to
> >>> devel-unsubscribe at lists.sailfishos.org
> >> _______________________________________________
> >> SailfishOS.org Devel mailing list
> >> To unsubscribe, please send a mail to
> >> devel-unsubscribe at lists.sailfishos.org
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> > To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> w
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20151205/4054f324/attachment.html>


More information about the Devel mailing list