ArtDelegate.qml 322 B

1234567891011121314151617
  1. import QtQuick 2.5
  2. import Box2D 2.0
  3. import Qt.labs.settings 1.0
  4. ImageBoxBody {
  5. id: picture
  6. onYChanged: y > floor.y && picture.destroy()
  7. density: 1.0
  8. friction: 0.0
  9. fixedRotation: parent.fixedRotation
  10. world: parent.physicsWorld
  11. bodyType: Body.Dynamic
  12. source: imageModel.randomPicture()
  13. }