Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-28668

Add ability to retrieve global coordinates for Item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P5: Not important P5: Not important
    • None
    • 5.0.0 RC 2
    • None
    • 08327da795ee8c4b26441cc0de1a5c49bd5f2b39

      Item's coordinates (x, y) are relative to it's parent. It would be very useful to retrieve global coordinates (on desktop). We can find coordinates relative to root item using mapToItem() and pass null as item, but there is no simple way to find coordinates of root item's window.
      So there is several ways Qt can be improved to solve this problem:
      1. Add global coordinates as properties to Item (globalX, globalY)
      2. Add Window as a property to Item (it's x and y coordinates are global).
      3. Made root item's coordinates to be global (now it is 0,0).

        For Gerrit Dashboard: QTBUG-28668
        # Subject Branch Project Status CR V

            martinj Martin Jones
            krnekit Nikita Krupenko
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes