box2d is an excellent open source physics engine
box2d official website https://box2d.org/
qml box2d plug-in project
https://gitee.com/gao_yao_yao/qml-box2d
1. qml box2d plug-in project
- Download, unzip qml-box2d-master.zip, open box2d.pro with qt, compile Debug|Release
- Copy Box2D.dll|Box2Dd.dll to the qt installation directory.
D:\Qt\Qt5.12.12\5.12.12\msvc2017\qml\Box2D
The Box2D folder needs to be created by yourself. - Unzip the qmldir in qml-box2d-master.zip here
. 4. Unzip the contents of qml-box2d-master.zip toD:\Qt\Qt5.12.12\5.12.12\msvc2017\include\Box2D
the Box2D folder and create it yourself.
2. demo project
- Create a new demo project (Qt Quick)
- main.qml new
import Box2D 2.0
- Compilation and running pass, indicating that the environment setup is completed.