Missing parent in hierarchical qml files - StackView component (tutorial: Qt Cloud : To Do )



  • Sorry for the noob question, I just cannot figure it out :)
    in the tutorial : https://developer.qtcloudservices.com/mar/tutorials/todo

    they use parenting to create the hierarchy of qml edits.
    Opening the home.qml directly in the Quick Editor , I have missing 'parent' anchor.

    it makes sense the qml is defined as :
    @
    Item {
    width: parent.width
    height: parent.height
    }
    @

    and usually called from main.qml like this:

    @
    StackView {
    id: mainView
    anchors.fill: parent
    initialItem: Qt.resolvedUrl("Home.qml");
    }
    @

    Now, I want to edit the home.qml component/widget into the Editor.
    How can I bypass the error/warning of the missing anchor ? 'missing parent'

    I do not understand why we cannot edit this component from "the main.qml" component.
    The 'Go Into Component' is grey.
    Selecting the 'mainview' into the editor, the 'StackView' tab is empty.

    what s the trick ?

    [Edited - Please use code tags "@@" - p3c0]



  • There is a "ignore" option for the error message, doesn't?



  • Correct. but if I "ignore" the errors, the UI is scrambled and unusable.
    I suppose they use 'default' values to replace the parent's ones.


Log in to reply
 

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