Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. understanding transform
QtWS25 Last Chance

understanding transform

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
transformrotationoriginaxis
2 Posts 2 Posters 687 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.
  • H Offline
    H Offline
    houmingc
    wrote on 27 Feb 2019, 15:11 last edited by
    #1

    import QtQuick 2.0

    Row{
    x:10 y:10
    spacing: 10

     Image{ source:"pics/qt.png"}
     Image{
                  source:"pics/qt.png"
                  transform: Rotation{ origin.x:30, origin.y:30, axis{x:0, y:1, z:0} angle:18}
    }
    

    My understanding, pics will be rotated from origin towards axis? how does angle comes in
    default axis is Z axis
    what is default angle?

    T 1 Reply Last reply 27 Feb 2019, 22:16
    0
    • H houmingc
      27 Feb 2019, 15:11

      import QtQuick 2.0

      Row{
      x:10 y:10
      spacing: 10

       Image{ source:"pics/qt.png"}
       Image{
                    source:"pics/qt.png"
                    transform: Rotation{ origin.x:30, origin.y:30, axis{x:0, y:1, z:0} angle:18}
      }
      

      My understanding, pics will be rotated from origin towards axis? how does angle comes in
      default axis is Z axis
      what is default angle?

      T Offline
      T Offline
      Tom_H
      wrote on 27 Feb 2019, 22:16 last edited by
      #2

      @houmingc You took that example straight from the documentation page for Rotation, which shows a picture of exactly what will happen. What more do you need? "Default angle" makes no sense. If you don't specify one there will be no rotation. It rotates around the origin along the axis. If you still don't understand, make a quick example and play around with it.

      1 Reply Last reply
      1

      2/2

      27 Feb 2019, 22:16

      • Login

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