Need help in stackview refreshing of screens during pop operations
-
Hi Team,
I have a multiple qml files (say A, B, C, D,......).
Using stackView, I have push the qml files to stack [A -> B -> C].
But When I do pop operation, the top most item will be destroyed i.e., C and the next item will be visible on the stack i.e., B.My query is, how can I refresh the visible screen during pop operation i.e., When popped, the screen C is destroyed and screen B is to refresh and display new data ?
I am not very comfortable in qml and any sample code will be helpful.
Thank You
-
@fcarney
Thank you for your response.
The onVisibleChanged is calling for push operations as well. I want it in pop operations.
For the second option, will it be possible to provide pseudo code@Praveen-Illa I am so sorry. I posted the wrong link yesterday. doh!
https://doc.qt.io/qt-5/qtquick-modelviewsdata-modelview.html
This is what I meant to post. lol -
Check to see if "visible" changes when it shows B again:
onVisibleChanged: { console.log(visible); }
You could do a refresh here if this changes.
Or you could make your source objects have properties that fire signals so it would update automatically. Models do this and can update the data in the Views in QML.
-
Check to see if "visible" changes when it shows B again:
onVisibleChanged: { console.log(visible); }
You could do a refresh here if this changes.
Or you could make your source objects have properties that fire signals so it would update automatically. Models do this and can update the data in the Views in QML.
@fcarney
Thank you for your response.
The onVisibleChanged is calling for push operations as well. I want it in pop operations.
For the second option, will it be possible to provide pseudo code -
@fcarney
Thank you for your response.
The onVisibleChanged is calling for push operations as well. I want it in pop operations.
For the second option, will it be possible to provide pseudo code -
@fcarney
Thank you for your response.
The onVisibleChanged is calling for push operations as well. I want it in pop operations.
For the second option, will it be possible to provide pseudo code@Praveen-Illa I am so sorry. I posted the wrong link yesterday. doh!
https://doc.qt.io/qt-5/qtquick-modelviewsdata-modelview.html
This is what I meant to post. lol -