Setup a QGraphicsView with Bottom Left Coordinate origin ?

  • 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 ?



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

  • 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


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.