Forums

OverviewV-Play 2 Support (Qt 5)Dynamic list of components › Reply To: Dynamic list of components

OverviewV-Play 2 Support (Qt 5)Dynamic list of components › Reply To: Dynamic list of components
#9812

Günther
V-Play Team

Hi NanoBreeze!

I don’t know what your actual goal is, but maybe a simple javascript array might just do the trick for you? 😉

For example, you could add a javascript array property that stores all the components you add.

Item {
    property var myComponents: []

    function addComponent(component) {
      myComponents.push(component)
    }
    
    function getComponent(index) {
      return myComponents[index]
    }
}

 

Hope, this helps!

Best,
GT

 

 

  • This reply was modified 3 years ago by  GT.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support