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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions