PDA

View Full Version : Integer overflow in QPainter::drawEllipse()?



Spitfire
3rd November 2011, 16:22
Guys,

Does anyone know about integer overflow bug in QPainter::drawEllipse()?


void MainWindow::paintEvent(QPaintEvent *)
{
QPainter p(this);
p.setBrush(Qt::red);
p.drawEllipse(QPointF(-327650.0, 131100.0), 10.0, 10.0);
}Code above will draw black circle in top left corner of the widget (Windows only, Linux is fine) instead of far away from the visible area.

It doesn't happen for ie drawRectangle.

I couldn't find anything in Qt Bug Database.

Tested with Qt 4.6.3 and 4.7.4.