Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Why does refferencing by ID kill everything



  • Hello guys,
    There is a question I have not found explamation on.
    If a SuperComponent has property Component style
    and when I instance

    ContainerComponent
    {
       SuperComponent 
       {
       style: StyleComponent {} //everything works
       }
    }
    

    But if I do something like this:

    ContainerComponent
    {
       SuperComponent 
       {
          style: styleComponentId //errors
       }
    
       StyleComponent 
       {
          id: styleComponentId
       }
    }
    

    How does referencing by id work?
    And is id refferencing the same as direct linking in QML?