Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Why does PageStackWindow not add itself as Parent to a child page ?
Forum Updated to NodeBB v4.3 + New Features

Why does PageStackWindow not add itself as Parent to a child page ?

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SidTheLazy
    wrote on last edited by
    #1

    If I use the most basic code autogenerated from a QtQuick Project I'm already in trouble:

    Try running:

    @//main.qml:

    import QtQuick 1.1
    import com.nokia.meego 1.0

    PageStackWindow {
    id: appWindow

    initialPage: mainPage
    onWidthChanged: console.log("Stack Width has changed to:", width)
    
    MainPage {
        id: mainPage
    }
    
    ToolBarLayout {
        id: commonTools
        visible: true
        ToolIcon {
            platformIconId: "toolbar-view-menu"
            anchors.right: (parent === undefined) ? undefined : parent.right
            onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close()
        }
    }
    
    Menu {
        id: myMenu
        visualParent: pageStack
        MenuLayout {
            MenuItem { text: qsTr("Sample menu item") }
        }
    }
    

    }

    //MainPage.qml

    import QtQuick 1.1
    import com.nokia.meego 1.0

    Page {
    tools: commonTools

    onWidthChanged: console.log("Page Width has changed to:", width)
    Label {
        id: label
        anchors.centerIn: parent
        text: qsTr("Hello world!")
        visible: false
    }
    
    Button{
        anchors {
            horizontalCenter: parent.horizontalCenter
            top: label.bottom
            topMargin: 10
        }
        text: qsTr("Click here!")
        onClicked: label.visible = true
    }
    

    }@

    And start resizing the window on a Desktop. The MainPage has no parent connection (at least not using ubuntu and meego 1.0)
    Is this a bug or am I missing something fundamentally here ?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      favoritas37
      wrote on last edited by
      #2

      What do you mean "start resizing the window on a Desktop"?

      Also what exactly is your problem?

      At least from my point of view, the code is just fine (i tested it on the Meego Simulator).

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved