Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use PageStack? #491

Open
manhnt9 opened this issue Jan 28, 2017 · 1 comment
Open

How to use PageStack? #491

manhnt9 opened this issue Jan 28, 2017 · 1 comment

Comments

@manhnt9
Copy link

manhnt9 commented Jan 28, 2017

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?

@vimpostor
Copy link

How does your Register.qml look like? You are probably referencing to parent in the top component of Register.qml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants