Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.0
- Rectangle
- {
- width: 1024
- height: 768
- focus: true
- Repeater
- {
- id: rep;
- model: 1700
- Rectangle
- {
- id: rectt;
- width: 16; height: 16;
- color: "black";
- SequentialAnimation
- {
- running: true; loops: -1;
- ColorAnimation { target: rectt; property:"color"; from: "black"; to: "yellow"; duration: 1000;}
- ColorAnimation { target: rectt; property:"color"; from: "yellow"; to: "black"; duration: 1000;}
- }
- Timer
- {
- interval: 16; running: true; repeat: true;
- onTriggered:
- {
- parent.x = Math.random()*1024;
- parent.y = Math.random()*768;
- }
- }
- }
- }
- Keys.onPressed: { if(event.key == Qt.Key_Escape) Qt.quit(); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement