[SailfishDevel] Connect accepted signal from a dynamically-loaded dialog to the previous page's method?

Benoît HERVIER khertan at khertan.net
Thu Oct 3 05:11:12 UTC 2013


http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-connections.html

Le mercredi 02 octobre 2013 à 21:47 -0700, Stockona a écrit :
> I have been trying to get this working to no avail. My code is like
> this:
> 
> 
> Page1.qml
> 
> 
> function update() {
>   ...
> 
> }
> 
> 
> 
> PullDownMenu {
>             MenuItem {
>                                         onClicked: { 
>                     var dialog = pageStack.push(Qt.resolvedUrl("Dialog1.qml"));
>                     // Not working. Dialog cannot see parent's properties?
>                     dialog.accepted.connect(update());
>                 }
>             }
>         }
> 
> 
> What is the right way to connect the accepted signal in the dialog to the update function in the Page1 caller?
> Thanks a lot!
> _______________________________________________
> SailfishOS.org Devel mailing list




More information about the Devel mailing list