Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 3 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, https://felgo.com/doc/vplay-editablecomponent/#properties-and-groups, it’s the same.
    You just use the texture bit but it is not explained how it should work.
    TextureDelegate is menioned here: https://felgo.com/doc/vplay-editablecomponent/#no-additional-metadata 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 https://felgo.com/doc/vplay-particlevplay/#textureFileName-prop 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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded