Skip to content

How to use PageStack? #491

Description

@manhnt9

Here is my code:

import QtQuick 2.7
import QtQuick.Window 2.2
import Material 0.3

ApplicationWindow {
    visible: true
    title: qsTr("PageStack")

    Item {
        anchors.centerIn: parent
        Column {
            anchors.centerIn: parent
            spacing: dp(20)

            Button {
                text: "Register"
                elevation: 1
                anchors.horizontalCenter: parent.horizontalCenter
                onClicked: {
                    onClicked: pageStack.push(Qt.resolvedUrl("Register.qml"))
            }
        }
    }
}

And the output when I click on the button is:
file:///home/$USER/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/StackView.qml:919: Error: Cannot assign to non-existent property "parent"

How can I use PageStack properly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions