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. sharing effects, method animation in Qml here...
Forum Updated to NodeBB v4.3 + New Features

sharing effects, method animation in Qml here...

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 1 Posters 567 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.
  • stackprogramerS Offline
    stackprogramerS Offline
    stackprogramer
    wrote on last edited by
    #1

    hi,dears
    i want to some beautiful methods and effects and methods animation for developing a mobile game .
    generally i need effects that is best and competitive to game app android and is acceptable.fortunately Qml is power full. so i will sharing here my effects that i find. the source and snapshot i will share here soon .
    i invited Qt experts that share their bright experience here,
    thanks for your attention

    1 Reply Last reply
    0
    • stackprogramerS Offline
      stackprogramerS Offline
      stackprogramer
      wrote on last edited by stackprogramer
      #2

      this is first my function demo :
      demo

      import QtQuick 2.2
      import QtQuick.Window 2.1
      Window {
          id:demo
          title:"Coreanimate"
          minimumHeight:Screen.desktopAvailableHeight/1.2
          maximumHeight: Screen.desktopAvailableHeight/1.2
          minimumWidth: Screen.desktopAvailableHeight/2
          maximumWidth: Screen.desktopAvailableHeight/2
          x: (Screen.desktopAvailableWidth-width)/2
          y: (Screen.desktopAvailableHeight-height)/2
          visible: true
          width: 360
          height:550
          color:"black";
          Row {id:row
              y:demo.height/2.5
              spacing: 5
              Rectangle {
                  width: 100; height: 100
                  color: "transparent"
      
                  SequentialAnimation on y {
                      loops: Animation.Infinite
                      PropertyAnimation { to: 10 }
                      PropertyAnimation { to: 100 }
                      PropertyAnimation { to:10 }
                      PropertyAnimation { to: 100 }
                      PropertyAnimation { to: 10 }
                      PropertyAnimation { to: 100 }
                      PropertyAnimation { to: 10 }
                      PropertyAnimation { to: 100 }
      
      
      
                  }
      
      
                  SequentialAnimation on x{
                      loops: Animation.Infinite
                      PropertyAnimation { to:10 }
                      PropertyAnimation { to:50 }
                      PropertyAnimation { to: 100}
                      PropertyAnimation { to: 150 }
                      PropertyAnimation { to:200 }
                      PropertyAnimation { to:250 }
                      PropertyAnimation { to: 300}
                      PropertyAnimation { to: 350 }
      
      
      
                  }
      
      
      
                  Image {id:image
      
      
                       source:"egg0my.png";
      
      
                       width:100
                      height:100
      
      
                      anchors.centerIn: parent
      
      
      
                      RotationAnimation on rotation {id:hrkh
                          duration:300;
                          loops: Animation.Infinite
                          from:360
                          to:0
                        }
      
                      MouseArea {
                          anchors.fill: parent
      
      
                      }
                  }
      
      
      
      
              }
      
      
      
      
      
          }
      
      
      
      
      }
      
      
      1 Reply Last reply
      0
      • stackprogramerS Offline
        stackprogramerS Offline
        stackprogramer
        wrote on last edited by stackprogramer
        #3

        demo2:
        link image:demo2
        demo.qml

        import QtQuick 2.2
        import QtQuick.Window 2.1
        Window {
            id:demo
            title:"Coreanimate"
            minimumHeight:Screen.desktopAvailableHeight/1.2
            maximumHeight: Screen.desktopAvailableHeight/1.2
            minimumWidth: Screen.desktopAvailableHeight/2
            maximumWidth: Screen.desktopAvailableHeight/2
            x: (Screen.desktopAvailableWidth-width)/2
            y: (Screen.desktopAvailableHeight-height)/2
            visible: true
            width: 360
            height:550
            color:"black";
            Row {id:row
                y:demo.height/3
                spacing: 5
        
        
        
             Rectangle   {
                      width: 240; height: 200
                      color:"black";
                      Component {
                          id: delegate
                          Column {
                              id: wrapper
                              Image {
                                  anchors.horizontalCenter: nameText.horizontalCenter
                                  width: 64; height: 64
                                  source: icon
                              }
                              Text {
                                  id: nameText
                                  text: name
                                  font.pointSize: 16
                                  color: wrapper.PathView.isCurrentItem ? "red" : "yellow"
                              }
                          }
                      }
        
                      PathView {
        
        
                          anchors.fill: parent
                      model: ContactModel {}
                          delegate: delegate
                          path: Path {
                              startX: 120; startY:120
                              PathQuad { x: 120; y: 125; controlX: 260; controlY: 105 }
                              PathQuad { x: 120; y: 110; controlX: -20; controlY: 105 }
                          }
                      }
                  }
        
        
        
        
        }
        }
        
        

        ContactModel.qml

        import QtQuick 2.0
        
        ListModel {
            ListElement {
                name: "A"
                icon: "egg0my.png"
            }
            ListElement {
                name: "B"
                icon: "egg0my.png"
            }
            ListElement {
                name: "C"
                icon: "egg0my.png"
            }
        }
        
        
        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 Extensions
        • Unsolved