Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How can i get gridview element's x,y coordinate in the gridview rect
Forum Updated to NodeBB v4.3 + New Features

How can i get gridview element's x,y coordinate in the gridview rect

Scheduled Pinned Locked Moved QML and Qt Quick
gridview
1 Posts 1 Posters 720 Views 1 Watching
  • 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 Offline
    S Offline
    ssjoon
    wrote on 13 Oct 2015, 08:41 last edited by ssjoon
    #1

    I am making network topology view .. using gridview

    and I place some image inside grid and next i want draw line between grid element

    I managed to get image object ..

        Component.onCompleted: { console.log("GridView onCompleted ");
            for(var i=0; i<tpGridView.count; i++){
                var cobject = tpGridView.children[tpGridView.currentIndex];
                if(cobject){ 
                    console.log(i+":"+String(cobject.children[0].children[0].width)); }
            }
        }
    

    but I can't get image's x,y value inside grid.. It tell only 0 ..

    I will use canvase to draw line between grid element

    How can i get grid element's x,y value??

    if more code or info need.. tell me

    Thanks for reading..

    1 Reply Last reply
    0

    1/1

    13 Oct 2015, 08:41

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved