Important: Please read the Qt Code of Conduct -

How to replace text with picture

  • Hi,

    Model View for List view. Used delegate to customize list item.

    List item has 4 labels with text which will receive from model.

    With new requirement, I have to show image for second label under some condition.

    Is it possible to replace text with image inside label?

    How to add "if" conditions inside label of qml file? (no clue for me)

    Any inputs.


  • solved it by handling from model. added new role (bool) to display text or image.

Log in to reply