[SailfishDevel] Interact from other pages with the cover page

Michael Fuchs michfu at gmx.at
Mon Aug 29 12:35:24 UTC 2016


Yes, that's what I'm doing in my projects.

BTW: you don't "read" properties, in QML you /bind/ properties.
http://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html



Am 29.08.2016 um 14:29 schrieb Dylan Van Assche:
> If I understand it correctly I need to do the following things:
>
>
>
>
>
>   *
>     Create an object in harbour-sailfinder.qml and give it an ID
>   *
>     Call the object with that ID from my current page (for example:
>     MainPage.qml) and assign some data to it.
>   *
>     Read the object out in CoverPage.qml by his ID
>
> Dylan
>
>> -------- Original Message --------
>> Subject: Re: [SailfishDevel] Interact from other pages with the cover page
>> Local Time: August 29, 2016 2:21 PM
>> UTC Time: August 29, 2016 12:21 PM
>> From: michfu at gmx.at
>> To: devel at lists.sailfishos.org
>>
>> Correction in SomeWherElse.qml
>>
>> Am 29.08.2016 um 14:19 schrieb Michael Fuchs:
>> > Hi Dylan,
>> >
>> > Children from ApplicationWindow are AFAIK accessible everywhere.
>> >
>> > harbour-example.qml:
>> >
>> > ApplicationWindow {
>> >
>> > ...
>> > MyObject {
>> > id: mo
>> > someString: "Eins"
>> >
>> > function test(){}
>> > }
>> > ...
>> > }
>> >
>> > CoverPage.qml:
>> >
>> > CoverBackground {
>> > CoverPlaceholder {
>> > text: mo.someString
>> > }
>> > CoverActionList {
>> > CoverAction {
>> > iconSource: "image://theme/icon-cover-play"
>> > onTriggered: mo.test()
>> > }
>> > }
>> > }
>> >
>> > SomeWhereElse.qml
>> >
>> > Page {
>> > ...
>> > onEvent: mo.someString = "Zwei"
>> > ...
>> > }
>> >
>> > greetz
>> >
>> >
>> >
>> > Am 29.08.2016 um 14:03 schrieb Dylan Van Assche:
>> >> Hi devs,
>> >>
>> >> I'm rebuilding Sailfinder and I'm looking for a better way for my
>> >> interaction between the cover and other pages.
>> >> In the old version I let the cover play the man in middle when Python
>> >> transfered the data to the current QML page but it was a messy
>> solution.
>> >> I looked at the source code of different Sailfish OS projects but
>> >> nothing that really looked simple for my purpose.
>> >>
>> >> I read about 'Connections' in QML but I can't figure out if I can use
>> >> that QML type to let the page interact with the cover. I want to avoid
>> >> C++ as much as possible in order to create a non-arch package.
>> >> Maybe someone here who can help?
>> >>
>> >> Dylan
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> 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
>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
>


More information about the Devel mailing list