Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    How to replace text with picture

    QML and Qt Quick
    1
    2
    429
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      av2306 last edited by

      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.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • A
        av2306 last edited by

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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post