Question 2:
You have to set the brush of the painter, not of the pen.
The pen draws only the border.
rg.setColorAt(0, Qt::red);
rg.setColorAt(1, Qt::white);
painter.drawEllipse(this->fire_point.x(), this->fire_point.y(), this->fire_size*2, this->fire_size*2);
QRadialGradient rg(this->fire_point, this->fire_size);
rg.setColorAt(0, Qt::red);
rg.setColorAt(1, Qt::white);
painter.setBrush(QBrush(rg));
painter.drawEllipse(this->fire_point.x(), this->fire_point.y(), this->fire_size*2, this->fire_size*2);
To copy to clipboard, switch view to plain text mode
Bookmarks