Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is there any good tutorial for mapping coordinate system?
Forum Updated to NodeBB v4.3 + New Features

Is there any good tutorial for mapping coordinate system?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 491 Views 2 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.
  • M Offline
    M Offline
    MSDQuick
    wrote on last edited by
    #1

    Hi guys ;

    Is there any useful tutorial about how to use mapping coordinate system. I mean MapToScene MapToItem and so on...
    I read some posts in other forums, but they are not complete enough..!
    For example , I have a custom QGraphicsItem ( a Rectangle ) in my scene and I would like to retrieve the distance between Top-Left position of that item , to Top-Left of the my custom QGraphicsView . Or I would like to retrieve the distance between Top-Left position of that QGraphicsView , to Top-Left of the my custom QGraphicsScene , and so on ...

    Thanks for helping...

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      The coordinate system of graphics view framework is explained in the documentation.

      The problem with answering your questions is that they are not specific enough:

      I would like to retrieve the distance between Top-Left position of that item , to Top-Left of the my custom QGraphicsView

      What is a top-left position? If the item is rotated is that the top-left corner of the unrotated rectangle or the top-left corner of the rotated bounding box? What units would you like that distance in? The scene units (the scene can be scaled be scaled), item units (it can be scaled individually or relative to parent) or the view units (pixels? dpi independent units? something else?)?

      Or I would like to retrieve the distance between Top-Left position of that QGraphicsView , to Top-Left of the my custom QGraphicsScene

      Again, which units do you want that in? Scene, item(relative or absolute) or the view?

      and so on...

      I don't think there's a list of all the possibilities. If your case is not in the docs tell us what you need and we'll try to help you figure it out.

      1 Reply Last reply
      0

      • Login

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