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 refferencing by ID kill everything
Forum Updated to NodeBB v4.3 + New Features

Why does refferencing by ID kill everything

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlrefferencestylestylesscope
1 Posts 1 Posters 691 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.
  • K Offline
    K Offline
    Kofr
    wrote on last edited by Kofr
    #1

    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?

    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