Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Back button functionality and multiple times statement execution in Component.onCompleted

$
0
0
Hi, I am developing an app which is for now mainly for Android. There are 1-2 points that I want to discuss, which are as follows: 1. Back button functionality in app For this I have searched and tried many things I have like two main screen in app containing sub components in it. When I am trying to switch from second screen to first screen using Keys.onReleased button click handler on second screen, it is actually not going inside handler. Here is code snippet Item { id: student_home_page; focus: true   // ///////////////////////////////////////////////////////////////    Keys.onReleased: {   console.log("TEST for Back ");   if (event.key == Qt.Key_Back) {       console.log("BAck Button HAndled");       event.accepted = true;   } } } So could anyone guide me what I am doing wrong I tried to override onBackPressed in android too but did not work. 2. Sometimes when I push or pop between two pages the statements in Component.onCompleted executes more then once usually three times. This is causing serious performance issues as I am processing some json strings there. So I research about it and found something but I need to resolved for sure. so Any suggestions on this too. searched link that I found Fast Forwarding [qt-project.org] Thanks in adavnce

Viewing all articles
Browse latest Browse all 4972

Trending Articles