ArtDelegate.qml 401 B

1234567891011121314151617181920212223
  1. import QtQuick 2.5
  2. import Box2D 2.0
  3. import Qt.labs.settings 1.0
  4. ImageBoxBody {
  5. id: picture
  6. signal beyondThePale(var item)
  7. onYChanged:
  8. if (y > floor.y)
  9. beyondThePale(this)
  10. density: 10
  11. friction: 0
  12. restitution: 0.2
  13. fixedRotation: parent.fixedRotation
  14. world: parent.physicsWorld
  15. bodyType: Body.Dynamic
  16. source: imageModel.randomPicture()
  17. }