ArtDelegate.qml 454 B

12345678910111213141516171819202122232425
  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. property var effect
  8. onYChanged: {
  9. if (y > globalFloor.y) {
  10. beyondThePale(this)
  11. }
  12. }
  13. density: 1.0
  14. friction: 0
  15. restitution: physicsSettings.restitution
  16. fixedRotation: physicsSettings.fixedRotation
  17. bodyType: Body.Dynamic
  18. source: imageModel.randomPicture()
  19. }