Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Loading Item3d via Qml Loader

    QML and Qt Quick
    1
    2
    1599
    Loading More Posts
    • 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
      paxl last edited by

      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 Reply Quote 0
      • P
        paxl last edited by

        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 Reply Quote 0
        • First post
          Last post