0

This is not a working example, my real code is to huge to add to the topic. I just want to understand the concept because I am quite confused. How can I update a property of another component after a signal handler in another component is triggered? I would like to change the value of property test2 that lives in Page.qml to true to activate the opacity to be transparent on the image after the onLetterActivated handler is triggered.

Page.qml

    Item {
        id: root
        property bool test2: false
        Image {
            id: headerBackgroundImage
            visible: true
            opacity: root.test2 ? 0 : 1.
        }
    }

Contactpage.qml

    Item {
        id: root

        Page {
            id: page
            visible: true
        }
        
        Subpage {
            id: subpage
            onLetterActivated: {
                page.test2 = true
            }
        }
    }
test me
  • 47
  • 6

0 Answers0