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. Loading Item3d via Qml Loader
Forum Updated to NodeBB v4.3 + New Features

Loading Item3d via Qml Loader

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.8k 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.
  • P Offline
    P Offline
    paxl
    wrote on last edited by
    #1

    Hey everyone,

    I was wondering if I could load a qml file containing quick3d elements such as Item3D, Quads .... using a qml loader.
    Below is a piece of code showing what I' trying to do. Please let me know if it is the correct way to proceed.

    @ Repeater
    {
    model : roomModel
    delegate : roomDelegate
    }

    Component 
    {                           
        id : roomDelegate
    
        Loader
        {
            source : "Room.qml" // Contains an Item3D element
        }
    }  @
    
    1 Reply Last reply
    0
    • P Offline
      P Offline
      paxl
      wrote on last edited by
      #2

      For those interested, it is possible. I Fixed a bug regarding loaders and repeaters and it should soon be merged. However a cleaner way to do it would be like this :
      @Repeater
      {
      model : roomModel
      delegate : roomDelegate
      }

      Component
      {                          
          id : roomDelegate
      
          Item3D
          {
                Loader
               {
                    source : "Room.qml" // Contains an Item3D element
               }
          }
      } @
      

      This way our element as an Item3D as a parent which eases the rendering process.

      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