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. QML components relative position
Forum Updated to NodeBB v4.3 + New Features

QML components relative position

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 395 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.
  • A Offline
    A Offline
    Ankur1107
    wrote on last edited by
    #1

    How to get the QML components relative position in c++, I agree there are functions like maptoItem/mapFromItem with Item in QML.
    But is there any way we can get relative position through QQuickItem and finding the children with object name and then calling mapFromItem/mapToItem version on QQuickItem in C++.

    A 1 Reply Last reply
    0
    • A Ankur1107

      How to get the QML components relative position in c++, I agree there are functions like maptoItem/mapFromItem with Item in QML.
      But is there any way we can get relative position through QQuickItem and finding the children with object name and then calling mapFromItem/mapToItem version on QQuickItem in C++.

      A Offline
      A Offline
      Ankur1107
      wrote on last edited by
      #2

      @Ankur1107 got it use mapFromScene(), passing arg as QPointF point(0,0).

      1 Reply Last reply
      1

      • Login

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