Should I call page.destroy() when a page is closed?

  • I have a StackView where I add some pages with QML code like this:


    the pages have the following "close" button handler:

    Page {
        id: root
        function close()

    When close() is called I get "Error: Invalid attempt to destroy() an indestructible object" message in the application output.

    What does it mean? Why a page is indestructible? Should I remove this destroy() call?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.