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: mic...@gmx.at
To: devel@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-unsubscr...@lists.sailfishos.org
>>
> _______________________________________________
> 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
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org