ArtDelegate.qml 394 B

12345678910111213141516171819202122
  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 > globalFloor.y)
  9. beyondThePale(this)
  10. density: 1.0
  11. friction: 0
  12. restitution: settings.restitution
  13. fixedRotation: parent.fixedRotation
  14. bodyType: Body.Dynamic
  15. source: imageModel.randomPicture()
  16. }