Results 1 to 2 of 2

Thread: RotationAnimation

  1. #1
    Join Date
    Jan 2016
    Posts
    54
    Thanks
    7
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default RotationAnimation

    Hii everyone

    I want when I click on the Button, rotate the image,
    Ok for the first time, but after it doesn't rotate

    I want repeate rotation many times when I click on the button

    Qt Code:
    1. Button {
    2. ...
    3. Image{
    4. id : background
    5. source : "../background.jpg"
    6.  
    7. RotationAnimation onRotation {
    8. from : 0
    9. to : 360
    10. duration : 300
    11. running : root.running
    12. }
    13. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: RotationAnimation

    Not sure where that "onRotation" comes from, but what you are probably looking for it

    Qt Code:
    1. RotationAnimation {
    2. target: background
    3. property: "rotation"
    4.  
    5. from: 0; to 100
    6. duration: 300
    7.  
    8. running: root.running
    9. }
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

Similar Threads

  1. RotationAnimation pause & resume
    By ChriD in forum Qt Quick
    Replies: 2
    Last Post: 17th February 2016, 09:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.