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
Forum Updated to NodeBB v4.3 + New Features

understanding transform

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
transformrotationoriginaxis
2 Posts 2 Posters 793 Views 2 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.
  • H Offline
    H Offline
    houmingc
    wrote on 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
    0
    • H houmingc

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

      • Login

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