OverviewFelgo 2 Support (Qt 5) › ItemEditor and file selector/image picker

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #18299


    Was looking at your demo for ParticleEditor and still can’t figure it out two things.

    How did you make image thumbnails visible in item editor?
    In the demo, editable component is just textureFilename entry, and it only includes {“label”: “Texture”}.
    All particle json files just include string as value for this property, how is it translated from string type to image?
    I don’t see this property set anywhere or what type is it.
    In the example in docs,, it’s the same.
    You just use the texture bit but it is not explained how it should work.
    TextureDelegate is menioned here: but not much info as well what texture is.
    Do I miss any docs?

    Is it possible to embed image picker inside item editor?
    Probably I can create my own delegate for texture and add some custom UI bits which include image picker trigger.
    Is that the only option?


    Felgo Team

    Hi Marcin,

    the textureFilename property is associated to the property of the ParticleVPlay item. This property is a Url. For Urls, the itemeditor uses a TextureDelegate to render the image. The ItemEditor automatically analyses the type of a property, but you can also override it by setting the propertyType.

    This should also allow you to display images from an image picker within the ItemEditor.





    Hi Alex,

    Thank you for hints.
    Sorry for late reply.


    Had some time to play with it and managed to make it work.
    Kind of 🙂

    Had some issues with ../ in url but resolved it with :encodeURIComponent

    property url someImage: Qt.resolvedUrl(encodeURIComponent("../assets/image.png"))

    So it uses Texture delegate because I use url type with, right?
    Is there a way to control the size of the thumbnail in TextureDelegate?


    Currently item editor displays the whole image what is not ideal 🙂
    From what I have seen TextureDelegate interface has only updateText method, nothing for width/height of the thumbnail.
    I think it makes, since this is a TextureDelegate so expect small, texture image.
    Last option, if I want to control the sire of image in item editor, is to creating my custom Delegate?


    Another option is to use ItemEditor.addItemsToExternalGroupPanel with some custom content. Probably will check this first.



    Felgo Team

    Hi Marcin,

    yes, for the url type properties the TextureDelegate is used, and the size is not changeable with public properties so far.


Viewing 4 posts - 1 through 4 (of 4 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