Details
-
Bug
-
Resolution: Done
-
P5: Not important
-
None
-
5.0.0 RC 2
-
None
-
08327da795ee8c4b26441cc0de1a5c49bd5f2b39
Description
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).