On Saturday 06 February 2016, Dirk Hohndel wrote:
> We are using the mobile components for an Android application.
> 
> One of the features we get by default from the components is that when the
> user presses the Android BACK key the top page is pop()-ed from the stack.
> 
> Is there a way to get a call back when that happens? So something like
> 
> onPagePopped: { resetState() }

ok, so I added something in master that should be useful for you:
in the root of your page you do:

Page {

onBackRequested: {
        if (//edit mode condition) {
            event.accepted = true;
            //go out of edit mode
        }
    }
  [...]
}

 event.accepted = true; stops the application to do the pop.

-- 
Marco Martin
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to