Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved QGraphicsItem: How to get graphicsitem id?

    General and Desktop
    2
    2
    957
    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.
    • S
      ShrikantAmbade last edited by

      Hello Everyone,

      I want to identify two graphics item. I want to know there id, How to get item-id??

      Many Thanks,

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        Hi
        you could use
        http://doc.qt.io/qt-5.5/qgraphicsitem.html#setData
        to insert a TAG/ID of you own.

        Then use data() to read to and check if the correct TAG/ID

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