Results 1 to 2 of 2

Thread: Handle event when stackview pop

  1. #1
    Join Date
    Sep 2015
    Posts
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Handle event when stackview pop

    Hi,
    I have stackview in main.qml. I use this stackview to push A.qml and in A.qml push to B.qml. I want to handle event in page A when page B pop look like Component.onCompleted
    How to i do this?
    Thanks!!!

  2. #2
    Join Date
    Sep 2015
    Posts
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default StackView pop

    Hi,
    I develop a android app using Qt. I have a StackView in main.qml. I use this StackView push other page. I have page A, B, C, D...
    Now, in main StackView push A page, in A push to B, in B push to C... ( A->B->C ) When in page C, I want to pop page A not B.
    How to I do this?

    Qt Code:
    1. main.qml
    2.  
    3. {
    4. StackView {
    5. id: stackView
    6. anchors.fill: parent
    7. }
    8.  
    9. Button { onClicked: stackView.push("qrc:/A.qml") }
    10. }
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. A.qml
    2. {
    3. Button { onClicked: stackView.push("qrc:/B.qml") }
    4. }
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. B.qml
    2.  
    3. {
    4. Button { onClicked: stackView.push("qrc:/C.qml") }
    5. }
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. C.qml
    2. {
    3. Button { onClicked: // I want to pop to page A not B }
    4. }
    To copy to clipboard, switch view to plain text mode 
    Thanks!!!

Similar Threads

  1. Replies: 4
    Last Post: 20th July 2012, 12:41
  2. How to handle Close Event ?
    By shanchathuranga in forum Qt Programming
    Replies: 1
    Last Post: 28th June 2012, 09:09
  3. How to handle mousehover event on a label?
    By moiit in forum Qt Programming
    Replies: 5
    Last Post: 28th January 2011, 04:16
  4. HOw to handle checkBox event occured in qlistwidget
    By sanket.mehta in forum Qt Programming
    Replies: 0
    Last Post: 16th November 2010, 10:36
  5. Replies: 0
    Last Post: 15th June 2010, 10:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.