Translations:Development/Tutorials/Physical Simulation/85/en: Difference between revisions
(Importing a new version from external source) |
(No difference)
|
Latest revision as of 17:41, 19 July 2019
void BallGraph::paintEvent(QPaintEvent* event) {
double position=logic->getPosition(); QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing, true); //draw ball painter.setPen(QPen(Qt::red, 4)); painter.drawEllipse(95, 575-position, 2*radius, -2*radius); //draw floor painter.fillRect( 10, 595, 180, -20 , QColor(40, 40, 40) );
} </syntaxhighlight>