Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to rotate GraphicsView with absolute value
Qt 6.12 LTS is out! See what's new in the release blog

How to rotate GraphicsView with absolute value

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 665 Views
  • 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
    marki
    wrote on last edited by
    #1

    Hello
    Sorry about my (bad) English (german :-)
    i want to plot geographic waypoints in a GraphicsView, this works.
    the view is cyclic re paint every 5 sec.
    i have an electronic compass input value (0-359 degrees).
    i want to rotate the view with the compass, with the absolute value.
    i have only found to rotate +/- relativ, not absolut.
    so when the compass value is fix and i use the "relativ" command below, then the view turn by every replot.
    is there an absolute command/function for this? or how i can do that?

    self.ui.mainGphViewMap.rotate(self.compass)
    
    JonBJ 1 Reply Last reply
    0
    • M marki

      Hello
      Sorry about my (bad) English (german :-)
      i want to plot geographic waypoints in a GraphicsView, this works.
      the view is cyclic re paint every 5 sec.
      i have an electronic compass input value (0-359 degrees).
      i want to rotate the view with the compass, with the absolute value.
      i have only found to rotate +/- relativ, not absolut.
      so when the compass value is fix and i use the "relativ" command below, then the view turn by every replot.
      is there an absolute command/function for this? or how i can do that?

      self.ui.mainGphViewMap.rotate(self.compass)
      
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @marki
      I do not know whether there is a better way, but if you have to can you not maintain how much you have previously rotated by, and then you know what relative amount to rotate by to achieve an absolute rotation?

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