PDA

View Full Version : QPainter::drawPoint ( int x, int y )



berliner
10th May 2010, 00:07
The following code paints a thick, red, square dot on Windows, but nothing at all on Linux (Ubuntu).



QPen myPen(Qt::red);
myPen.setWidth(20);
pnt->setPen(myPen);
pnt->setBrush(Qt::NoBrush); // should not be necessary, but doesn't hurt
pnt->drawPoint(100, 100);

On Linux a dot is only drawn when the width is set to 1. Anyhting bigger than 1 results in a blank canvas.

I'm using Qt 4.6. What am I doing wrong here? Any help is appreciated. Or is this a known bug? If only 1 pixel dots are allowed, I would still think it should be the same on all platforms?