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 way to rotate coordinate system respect y.
Qt 6.11 is out! See what's new in the release blog

Is there any way to rotate coordinate system respect y.

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 999 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.
  • T Offline
    T Offline
    turkoz14
    wrote on last edited by
    #1

    Hi, im new using qt and i kno that i can rotate the coordinate system with gracphicview->rorate() but this rotate respect x only so the x axis will always be on the top.
    i can explain better what i need attaching this images:
    0_1519504135612_coordsystem.jpg
    this is the default system, but if i rotate it wiht the function rotate it rotates clockwise online and what i need is this :
    0_1519504193125_coordsystem2.jpg

    No rotating 270° cause that makes that the x axis is on the top and y above.
    Thanks in advice.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      QTransform is likely what you want to use in order to do that.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • T Offline
        T Offline
        turkoz14
        wrote on last edited by
        #3

        Hi, thanks for the quick response.
        Im checking and doint this:
        this->ui->graphicsView->transform().rotate(180,(Qt::Axis(Qt::YAxis)));
        but there is no change on the visualization.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What about applying it on the item directly ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • T Offline
            T Offline
            turkoz14
            wrote on last edited by
            #5

            No, the same nothing happend and also the thing is to do it to the whole scene cause i add to many items to do it individually.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I just realized: you’re doing it wrong. Get the current transform, modify it and then set that new version of the transform.

              What you are doing is modify a copy of the transform object used by the scene. So it won’t have any influence.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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