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. Setup a QGraphicsView with Bottom Left Coordinate origin ?
Forum Updated to NodeBB v4.3 + New Features

Setup a QGraphicsView with Bottom Left Coordinate origin ?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.6k 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.
  • X Offline
    X Offline
    xteo
    wrote on last edited by
    #1

    Hi ,

    I am writing an application that display a series of layered tracks when the first track is at the bottom of the Scene .
    I currently adjust all the y position of my widget based on the height of the scene for my tracks are base on a bottom left origin but it is not very clean .

    is there a good way to setup a scene so new item coordinate are in a bottom Left origin coordinate system ?

    Thanks

    Damien

    1 Reply Last reply
    -1
    • R Offline
      R Offline
      rcari
      wrote on last edited by
      #2

      You could apply a transformation matrix that basically does this coordinates change for you and apply at the root element of your QGraphicsScene.

      1 Reply Last reply
      -1
      • X Offline
        X Offline
        xteo
        wrote on last edited by
        #3

        Cool but wouldn't all my Item inside the View been flipped as well ?
        as if I apply a scale(1,-1) to flip the y direction axis and then the transform to reset the origin .
        the "space" woulld be upside down ? would I have then to also scale(-1,1) all my childs item so they are the right way around ?

        I will do some test, I want to try to do it the correct way rather than "a way" that kinda works :)

        Thanks for your reply

        Damien

        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