Include the QB2Draw in your project
Create an object QB2Draw: QB2Draw * drawer=new QB2Draw(geometry); //Geometry is the geometry of your window
QB2Draw * drawer=new QB2Draw(geometry); //Geometry is the geometry of your window
Assign at your b2world world->setDebugDraw(drawer);
world->setDebugDraw(drawer);
In your paintEvent: QPainter p(this); drawer->setPainter(&p); world->drawDebugData(); ....//Your code here p.end();
QPainter p(this);
drawer->setPainter(&p);
world->drawDebugData();
....//Your code here
p.end();
There was an error while loading. Please reload this page.