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. Missing parent in hierarchical qml files - StackView component (tutorial: Qt Cloud : To Do )

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

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.1k Views
  • 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.
  • T Offline
    T Offline
    thevdeub
    wrote on 4 Jan 2015, 05:53 last edited by
    #1

    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]

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jcbritobr
      wrote on 4 Jan 2015, 13:29 last edited by
      #2

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

      1 Reply Last reply
      0
      • T Offline
        T Offline
        thevdeub
        wrote on 4 Jan 2015, 18:34 last edited by
        #3

        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.

        1 Reply Last reply
        0

        1/3

        4 Jan 2015, 05:53

        • Login

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