OverviewFelgo 2 Support (Qt 5) › Add icon to ListElement dynamically

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #17624

    Felgo User

    Is it possible to add an icon to ListElement dynamically?

    Setting them in a static way works fine:

    model: [
              { name: "Airplane Mode", icon: IconType.plane }


    Dynamic approach:

      model: mainModel
    ListModel {
    	id: mainModel
    function add()
    	var obj= {}; = " MyName"; 
    	obj.icon =;
    	var arr = [];



    Felgo Team


    Yes, you can use ListModel.append to add items dynamically.

    If your list view does not show the change automatically, you can also call list.modelChanged() to manually signal a change in your model.
    The view then updates accordingly.



Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

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
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support